src/diffAST.php
Method getAST
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getAST($content1, $content2)
{
$nodeTypes = [
[
"type" => 'nested',
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 ["type" => 'added', 'key' => $key, 'newValue' => $content2[$key]];
Avoid too many return
statements within this method. Open
Open
return $acc;
Avoid too many return
statements within this method. Open
Open
return $result;
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" => 'removed', 'key' => $key, 'oldValue' => $content1[$key]];
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 (!in_array($key, array_keys($content1)) && in_array($key, array_keys($content2)));