Showing 9 of 9 total issues
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,
Method renderAstForPlainFormat
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function renderAstForPlainFormat($ast)
{
$renderAst = function ($ast, $root) use (&$renderAst) {
$textRepresentationOfNodes = array_reduce($ast, function ($acc, $node) use ($root, &$renderAst) {
['type' => $type, 'key' => $key, 'value' => $value, 'oldValue' => $oldValue] = $node;
Method buildNode
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function buildNode($type, $key, $value, $oldValue = null, $children = [])
Avoid too many return
statements within this method. Open
Open
return array_merge(
$acc,
[$indent . '+' . $keyValuePairText],
[$indent . '-' . $keyOldValuePairText]
);
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 buildNode('added', $key, $data2[$key]);
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 $resultAst;
Avoid too many return
statements within this method. Open
Open
return $iter($obj1, $obj2);