orion122/diff-finder

View on GitHub

Showing 7 of 7 total issues

Method buildAST has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function buildAST($array1, $array2)
{
    $unionArraysKeys = union(array_keys($array1), array_keys($array2));

    return array_reduce($unionArraysKeys, function ($acc, $key) use ($array1, $array2) {
Severity: Minor
Found in src/buildAST.php - About 1 hr to fix

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

    function buildLine($isNested, $mark, $key, $value, $depth)
    Severity: Minor
    Found in src/output/pretty.php - About 35 mins to fix

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

      function buildArray($key, $type, $children, $from = null, $to = null)
      Severity: Minor
      Found in src/buildAST.php - About 35 mins to fix

        Avoid too many return statements within this method.
        Open

                            return buildLine('added', $parents . $array['key'], $array['from']);
        Severity: Major
        Found in src/output/plain.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return buildLine(false, "+", $array['key'], $array['from'], $depth);
          Severity: Major
          Found in src/output/pretty.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                return implode(PHP_EOL, array_filter(flattenAll($result)));
            Severity: Major
            Found in src/output/plain.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                  return implode('', flattenAll($result));
              Severity: Major
              Found in src/output/pretty.php - About 30 mins to fix
                Severity
                Category
                Status
                Source
                Language