src/formatters/Pretty.php
Method renderAstForPrettyFormat
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function renderAstForPrettyFormat($ast)
{
$renderAstForPrettyFormat = function ($ast, $depth) use (&$renderAstForPrettyFormat) {
$textRepresentationOfNodes = array_reduce(
$ast,
Avoid too many return
statements within this method. Open
Open
return "{\n{$textRepresentationOfAst}\n{$indent}}";
Avoid too many return
statements within this method. Open
Open
return $renderAstForPrettyFormat($ast, 0);
Avoid too many return
statements within this method. Open
Open
return array_merge(
$acc,
[$indent . '+' . $keyValuePairText],
[$indent . '-' . $keyOldValuePairText]
);