muyassarov/php-project-lvl2

View on GitHub
src/Formatters/pretty.php

Summary

Maintainability
A
2 hrs
Test Coverage

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

function render(array $ast): string
{
    $iter = function ($data, $level = 1) use (&$iter): string {
        
        $mapped = array_map(function ($node) use (&$iter, $level) {
Severity: Minor
Found in src/Formatters/pretty.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

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

      Avoid too many return statements within this method.
      Open

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

        Avoid too many return statements within this method.
        Open

                            return "{$indentChanged}+ {$key}: {$value}";
        Severity: Major
        Found in src/Formatters/pretty.php - About 30 mins to fix

          There are no issues that match your filters.

          Category
          Status