rentery/php-project-lvl2

View on GitHub
src/Formatters/Plain.php

Summary

Maintainability
A
2 hrs
Test Coverage

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

function render($tree)
{
    $iter = function ($tree, $rootKey = '') use (&$iter) {
        $renderedData = array_map(function ($node) use (&$iter, $rootKey) {
            $type = $node['type'];
Severity: Minor
Found in src/Formatters/Plain.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

                        return "Property '{$rootKey}{$key}' was added with value: '{$value}'";
    Severity: Major
    Found in src/Formatters/Plain.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

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

        Avoid too many return statements within this method.
        Open

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

          There are no issues that match your filters.

          Category
          Status