zharinovkv/php-project-lvl2

View on GitHub
src/Formatters/pretty.php

Summary

Maintainability
A
2 hrs
Test Coverage

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

function format($ast)
{
    $inner = function ($innerData, $depth) use (&$inner) {

        $mapper = function ($child) use ($depth, &$inner) {
Severity: Minor
Found in src/Formatters/pretty.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

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

      Avoid too many return statements within this method.
      Open

              return array_map($mapper, $innerData);
      Severity: Major
      Found in src/Formatters/pretty.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

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

          There are no issues that match your filters.

          Category
          Status