IgBuS/php-project-lvl2

View on GitHub
src/Formatters/basicFormat.php

Summary

Maintainability
A
3 hrs
Test Coverage
A
93%

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

function iter($diff, $depth = 0)
{
    $mapped = array_map(function ($item) use ($depth) {
        $indent = str_repeat('    ', $depth);
        switch ($item['type']) {
Severity: Minor
Found in src/Formatters/basicFormat.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

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

      Avoid too many return statements within this method.
      Open

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

        Avoid too many return statements within this method.
        Open

            return implode("\n", $mapped);
        Severity: Major
        Found in src/Formatters/basicFormat.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return "{$indent}    {$item['key']}: {\n{$result}\n    {$indent}}";
          Severity: Major
          Found in src/Formatters/basicFormat.php - About 30 mins to fix

            There are no issues that match your filters.

            Category
            Status