src/Formatters/Stylish.php
Method formatToStylish
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function formatToStylish(array $diffTree, int $depth = 0): array
{
$indent = getIndent($depth);
$nextDepth = $depth + 1;
$result = array_map(function ($node) use ($indent, $nextDepth): string {
Avoid too many return
statements within this method. Open
Open
return $result;
Avoid too many return
statements within this method. Open
Open
return "{$indent} {$node['key']}: {" . PHP_EOL .
"{$stringNested}" . PHP_EOL . "{$indent} }";