Showing 7 of 7 total issues
Method buildAST
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildAST($array1, $array2)
{
$unionArraysKeys = union(array_keys($array1), array_keys($array2));
return array_reduce($unionArraysKeys, function ($acc, $key) use ($array1, $array2) {
Method buildLine
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function buildLine($isNested, $mark, $key, $value, $depth)
Method buildArray
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function buildArray($key, $type, $children, $from = null, $to = null)
Avoid too many return
statements within this method. Open
Open
return buildLine('added', $parents . $array['key'], $array['from']);
Avoid too many return
statements within this method. Open
Open
return buildLine(false, "+", $array['key'], $array['from'], $depth);
Avoid too many return
statements within this method. Open
Open
return implode(PHP_EOL, array_filter(flattenAll($result)));
Avoid too many return
statements within this method. Open
Open
return implode('', flattenAll($result));