kalash-job/php-project-lvl2

View on GitHub

Showing 5 of 5 total issues

Method iter has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function iter(array $tree, int $depth): array
{
    return array_map(function ($node) use ($depth) {
        $prefixMinus = '  - ';
        $prefixPlus = '  + ';
Severity: Minor
Found in src/Formatters/Pretty.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

        return "{\n{$unionLine}\n{$lastOffset}    }";
    Severity: Major
    Found in src/Formatters/Pretty.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

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

        Avoid too many return statements within this method.
        Open

                return "{$offset}{$prefixSpaces}{$item['key']}: {$innerValue}";
        Severity: Major
        Found in src/Formatters/Pretty.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                  return "'{$value}'";
          Severity: Major
          Found in src/Formatters/Plain.php - About 30 mins to fix
            Severity
            Category
            Status
            Source
            Language