mrDenisZharkov/project-lvl2-s459

View on GitHub

Showing 4 of 4 total issues

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

function renderAstBody(array $ast, $nodeLevel = 0)
{
    $diffPrint = array_reduce($ast, function ($acc, $astNode) use ($nodeLevel) {
        $addedInd = '+';
        $removedInd = '-';
Severity: Minor
Found in src/formatters/Pretty.php - About 1 hr to fix

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

    function renderAstBody(array $ast, $path = '')
    {
        $diffPrint = array_reduce($ast, function ($acc, $astNode) use ($path) {
            $key = $astNode['key'];
            $beforeValue = $astNode['beforeValue'];
    Severity: Minor
    Found in src/formatters/Plain.php - About 1 hr to fix

      Method parseAst has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function parseAst($beforeDataObj, $afterDataObj)
      {
          $beforeData = get_object_vars($beforeDataObj);
          $afterData = get_object_vars($afterDataObj);
          
      Severity: Minor
      Found in src/Ast.php - About 1 hr to fix

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

        function initNode($key, $type, $beforeValue, $afterValue, $children)
        Severity: Minor
        Found in src/Ast.php - About 35 mins to fix
          Severity
          Category
          Status
          Source
          Language