Prionyx/project-lvl2-s197

View on GitHub
src/renders.php

Summary

Maintainability
B
4 hrs
Test Coverage

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

function prettyRender($ast)
{
    $spacesCount = function ($level) {
        $a = '';
        for ($i = 1; $i < $level; $i++) {
Severity: Minor
Found in src/renders.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

        return $iter($ast, '');
    Severity: Major
    Found in src/renders.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                          return "Property '{$parent}{$item['key']}' was removed\n";
      Severity: Major
      Found in src/renders.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return (implode(PHP_EOL, $report));
        Severity: Major
        Found in src/renders.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

              return "{\n{$iter($ast, 1)}\n}\n";
          Severity: Major
          Found in src/renders.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                                return stringify($item, $spaces, '-', 'oldValue');
            Severity: Major
            Found in src/renders.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                      return (implode('', $report));
              Severity: Major
              Found in src/renders.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                    return stringify($item, $spaces, '+', 'newValue');
                Severity: Major
                Found in src/renders.php - About 30 mins to fix

                  There are no issues that match your filters.

                  Category
                  Status