igor-i/project-lvl2-s137

View on GitHub

Showing 3 of 3 total issues

Method prettyReport has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function prettyReport(array $ast)
{
    $iter = function (array $branch, int $level) use (&$iter) {

        return array_map(function ($node) use ($level, $iter) {
Severity: Major
Found in src/reports.php - About 2 hrs to fix

    Method arraysDiff has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function arraysDiff(array $array1, array $array2)
    {
        $union = Collection\union(array_keys($array1), array_keys($array2));
    
        return array_reduce($union, function ($acc, $key) use ($array1, $array2) {
    Severity: Minor
    Found in src/differ.php - About 1 hr to fix

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

      function plainReport(array $ast)
      {
          $iter = function ($ast, $parents) use (&$iter) {
              return array_reduce($ast, function ($acc, $node) use ($iter, $parents) {
                  $parents[] = $node['node'];
      Severity: Minor
      Found in src/reports.php - About 1 hr to fix
        Severity
        Category
        Status
        Source
        Language