igor-i/project-lvl2-s137

View on GitHub
src/reports.php

Summary

Maintainability
A
3 hrs
Test Coverage

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 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

      There are no issues that match your filters.

      Category
      Status