Rinatsin/php-project-lvl2

View on GitHub
src/formatters/plain.php

Summary

Maintainability
A
2 hrs
Test Coverage

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

function renderTreeToPlain($ast, $pathRoot = null)
{
    $mapped = array_map(
        function ($node) use ($pathRoot) {
            if (isset($pathRoot)) {
Severity: Minor
Found in src/formatters/plain.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Confirmed

                        return;
    Severity: Major
    Found in src/formatters/plain.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Confirmed

          return implode("\n", $filteredEmptyNodes);
      Severity: Major
      Found in src/formatters/plain.php - About 30 mins to fix

        There are no issues that match your filters.

        Category
        Status