Nemial/php-project-lvl2

View on GitHub

Showing 4 of 4 total issues

Method build has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function build($tree, $depth = 1): string
{
    return implode(
        "\n",
        array_map(
Severity: Minor
Found in src/Formatters/Pretty.php - About 1 hr to fix

    Method generateAst has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function generateAst(object $before, object $after): array
    {
        $dataBefore = get_object_vars($before);
        $dataAfter = get_object_vars($after);
        $keys = union(array_keys($dataBefore), array_keys($dataAfter));
    Severity: Minor
    Found in src/Ast.php - About 1 hr to fix

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

      function build(array $tree, string $path = ""): string
      {
          $filtered = array_filter($tree, fn ($node) => getType($node) !== "unchanged");
      
          return implode(
      Severity: Minor
      Found in src/Formatters/Plain.php - About 1 hr to fix

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

        function makeNode($name, $type, $oldValue = null, $newValue = null, $children = null)
        Severity: Minor
        Found in src/Ast.php - About 35 mins to fix
          Severity
          Category
          Status
          Source
          Language