Showing 17 of 17 total issues
Method getAST
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getAST($content1, $content2)
{
$nodeTypes = [
[
"type" => 'nested',
Method prettyRender
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function prettyRender($ast)
{
$spacesCount = function ($level) {
$a = '';
for ($i = 1; $i < $level; $i++) {
Avoid too many return
statements within this method. Open
Open
return ["type" => 'unchanged', 'key' => $key, 'value' => $content1[$key]];
Avoid too many return
statements within this method. Open
Open
return $acc;
Avoid too many return
statements within this method. Open
Open
return (implode(PHP_EOL, $report));
Avoid too many return
statements within this method. Open
Open
return (in_array($key, array_keys($content1)) && in_array($key, array_keys($content2)) && $content1[$key] === $content2[$key]);
Avoid too many return
statements within this method. Open
Open
return (!in_array($key, array_keys($content1)) && in_array($key, array_keys($content2)));
Avoid too many return
statements within this method. Open
Open
return ["type" => 'added', 'key' => $key, 'newValue' => $content2[$key]];
Avoid too many return
statements within this method. Open
Open
return "{\n{$iter($ast, 1)}\n}\n";
Avoid too many return
statements within this method. Open
Open
return ["type" => 'removed', 'key' => $key, 'oldValue' => $content1[$key]];
Avoid too many return
statements within this method. Open
Open
return "Property '{$parent}{$item['key']}' was removed\n";
Avoid too many return
statements within this method. Open
Open
return (in_array($key, array_keys($content1)) && !in_array($key, array_keys($content2)));
Avoid too many return
statements within this method. Open
Open
return stringify($item, $spaces, '-', 'oldValue');
Avoid too many return
statements within this method. Open
Open
return $iter($ast, '');
Avoid too many return
statements within this method. Open
Open
return (implode('', $report));
Avoid too many return
statements within this method. Open
Open
return $result;
Avoid too many return
statements within this method. Open
Open
return stringify($item, $spaces, '+', 'newValue');