nikitovskij/php-gendiff

View on GitHub
src/Formatters/Pretty.php

Summary

Maintainability
A
2 hrs
Test Coverage
A
97%

Method makePrettyOutput has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function makePrettyOutput(array $tree, int $depth = 0): string
{
    $iter = function ($node) use ($depth) {

        [
Severity: Minor
Found in src/Formatters/Pretty.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

        return implode("\n", array_map($iter, $tree));
    Severity: Major
    Found in src/Formatters/Pretty.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                      return "{$indent}    {$key}: {$formattedValue}";
      Severity: Major
      Found in src/Formatters/Pretty.php - About 30 mins to fix

        There are no issues that match your filters.

        Category
        Status