MT-cod/php-project-lvl2

View on GitHub
src/Formatters/FormatStylish.php

Summary

Maintainability
A
2 hrs
Test Coverage
A
94%

Method stylishMapping has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function stylishMapping(array $resultDiffArr): array
{
    $stylishResult = array_map(function ($node): array {
        if (array_key_exists('diffStatus', $node)) {
            switch ($node['diffStatus']) {
Severity: Minor
Found in src/Formatters/FormatStylish.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

        return $flattenedStylishResult;
    Severity: Major
    Found in src/Formatters/FormatStylish.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                  return ["  " . $node['nodeKey'] => $childRecurs];
      Severity: Major
      Found in src/Formatters/FormatStylish.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return [];
        Severity: Major
        Found in src/Formatters/FormatStylish.php - About 30 mins to fix

          There are no issues that match your filters.

          Category
          Status