Showing 4 of 4 total issues
Method format
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function format(array $ast, int $level = 0)
{
$offset = str_pad('', $level * 4, ' ');
$diff = array_reduce($ast, function ($diff, $node) use ($offset, $level) {
switch ($node['type']) {
Method buildDiffAST
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildDiffAST(array $before, array $after)
{
$allPropertiesNames = array_unique(array_merge(array_keys($before), array_keys($after)));
$ast = array_reduce($allPropertiesNames, function ($ast, $name) use ($before, $after) {
$beforeValue = $before[$name] ?? null;
Avoid too many return
statements within this method. Open
Open
return $ast;
Avoid too many return
statements within this method. Open
Open
return $ast;