lobr17/php-project-lvl2

View on GitHub
src/Formatters/PrettyFormat.php

Summary

Maintainability
A
2 hrs
Test Coverage
A
97%

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

function iter($tree, $depth)
{
    $tab = createTab($depth * 4 - 2);
    $closeTab = createTab($depth * 4 - 4);
    $childDepth = $depth + 1;
Severity: Minor
Found in src/Formatters/PrettyFormat.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

                    return "${tab}  {$node['name']}: " . iter($node['children'], $childDepth);
    Severity: Major
    Found in src/Formatters/PrettyFormat.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

          return "{\n" . implode("\n", $result) . "\n${closeTab}}";
      Severity: Major
      Found in src/Formatters/PrettyFormat.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

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

          There are no issues that match your filters.

          Category
          Status