Valentina-Vasileva/php-project-lvl2

View on GitHub

Showing 10 of 10 total issues

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

function createNode(string $key, string $type, $oldValue, $newValue, $children = null): array
Severity: Minor
Found in src/Builder.php - About 35 mins to fix

    Avoid too many return statements within this method.
    Open

                    return [];
    Severity: Major
    Found in src/Formatters/Plain.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

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

        Avoid too many return statements within this method.
        Open

            return "{$value}";
        Severity: Major
        Found in src/Formatters/Plain.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                  return createNode($key, "unchanged", $firstData->$key, $secondData->$key);
          Severity: Major
          Found in src/Builder.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                return "{$value}";
            Severity: Major
            Found in src/Formatters/Stylish.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                  return $differences;
              Severity: Major
              Found in src/Builder.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                        return "[{$stringifiedArray}]";
                Severity: Major
                Found in src/Formatters/Stylish.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                  return "{$indent}    {$node['key']}: {$formattedNewValue}";
                  Severity: Major
                  Found in src/Formatters/Stylish.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                        return "{\n{$formattedString}\n{$indent}}";
                    Severity: Major
                    Found in src/Formatters/Stylish.php - About 30 mins to fix
                      Severity
                      Category
                      Status
                      Source
                      Language