muyassarov/php-project-lvl2

View on GitHub

Showing 5 of 5 total issues

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

    Method createAstNode has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function createAstNode($key, $type, $value = null, $newValue = null, $children = [])
    Severity: Minor
    Found in src/differ.php - About 35 mins 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
            Severity
            Category
            Status
            Source
            Language