ava239/php-project-lvl2

View on GitHub
src/Formatters/Pretty.php

Summary

Maintainability
A
2 hrs
Test Coverage

Method format has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function format(array $diff): string
{
    $format = function ($diff, $depth = 0) use (&$format) {
        return array_map(function ($node) use ($depth, $format) {
            switch ($node['type']) {
Severity: Minor
Found in src/Formatters/Pretty.php - About 1 hr to fix

    Method formatMessage has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function formatMessage(string $key, string $operation, $value, int $depth, string $formatStr = '  %s%s%s: %s'): string
    Severity: Minor
    Found in src/Formatters/Pretty.php - About 35 mins to fix

      Avoid too many return statements within this method.
      Open

                  return (string)$value;
      Severity: Major
      Found in src/Formatters/Pretty.php - About 30 mins to fix

        There are no issues that match your filters.

        Category
        Status