Rustam-Amirov/php-project-lvl2

View on GitHub

Showing 6 of 6 total issues

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

function buildNode($key, $type, $oldValue = null, $newValue = null, $children = [])
Severity: Minor
Found in src/GenDiff.php - About 35 mins to fix

    Avoid too many return statements within this method.
    Open

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

      Avoid too many return statements within this method.
      Open

                  return sprintf("{\n %s     %s: %s\n%s  }", $indent, $key, $tree->$key, $indent);
      Severity: Major
      Found in src/Formatters/Pretty.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

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

          Avoid too many return statements within this method.
          Open

                          return bringNodeToString($indent, ' ', $v['key'], stringify($v['oldValue'], $indent));
          Severity: Major
          Found in src/Formatters/Pretty.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                    return implode($values);
            Severity: Major
            Found in src/Formatters/Pretty.php - About 30 mins to fix
              Severity
              Category
              Status
              Source
              Language