zharinovkv/php-project-lvl2

View on GitHub
src/Formatters/plain.php

Summary

Maintainability
A
2 hrs
Test Coverage

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

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

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

    Avoid too many return statements within this method.
    Open

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

      Avoid too many return statements within this method.
      Open

                          return $inner($child['children'], "{$child['name']}.");
      Severity: Major
      Found in src/Formatters/plain.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

            return $inner($ast, null);
        Severity: Major
        Found in src/Formatters/plain.php - About 30 mins to fix

          There are no issues that match your filters.

          Category
          Status