src/Formatters/Stylish.php
Method nodeIterator
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function nodeIterator(array $tree, int $depth): string
{
$indentation = buildIndent($depth);
$formattedData = array_map(function ($node) use ($indentation, $depth): string {
$nodeType = $node['type'];
Avoid too many return
statements within this method. Open
Open
return "{$indentation} + {$nodeName}: {$addedValue}";
Avoid too many return
statements within this method. Open
Open
return "{\n{$joinedData}\n{$indentation}}";
Avoid too many return
statements within this method. Open
Open
return $formattedNode;