lion0k/project-lvl2-s385

View on GitHub
src/renderer/pretty.php

Summary

Maintainability
A
2 hrs
Test Coverage

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

function renderPretty($data, $depth = 0)
{
    $result = array_map(function ($node) use ($depth) {

        ['typeInfo' => $typeInfo,
Severity: Minor
Found in src/renderer/pretty.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

                    return makeString($depth, 'specialEmpty', $nameKey, renderPretty($children, $depth + 1));
    Severity: Major
    Found in src/renderer/pretty.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

          return '{' . PHP_EOL . $outStr . addSpace($depth) . '}';
      Severity: Major
      Found in src/renderer/pretty.php - About 30 mins to fix

        There are no issues that match your filters.

        Category
        Status