Showing 13 of 13 total issues
Method builder
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function builder(object $objBefore, object $objAfter): array
{
$unicKey = union(array_keys(get_object_vars($objBefore)), array_keys(get_object_vars($objAfter)));
$sortedUnicKey = array_values(sortBy($unicKey, function ($key) {
return $key;
Method stylish
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function stylish(array $tree, int $depth = 0): string
{
$indent = str_repeat(' ', $depth);
$stylishData = array_map(function ($node) use ($indent, $depth): string {
$type = $node['type'];
Avoid too many return
statements within this method. Open
Open
return $acc;
Avoid too many return
statements within this method. Open
Open
return [
'name' => $key,
'type' => 'changed',
'valueBefore' => $objBefore->$key,
'valueAfter' => $objAfter->$key
Avoid too many return
statements within this method. Open
Open
return implode("\n", addBrackets($stylishData, $indent));
Avoid too many return
statements within this method. Open
Open
return $plainData;
Avoid too many return
statements within this method. Open
Open
return $result;
Avoid too many return
statements within this method. Open
Open
return $data;
Avoid too many return
statements within this method. Open
Open
return arrToStr($dataFromObject, $depth);
Avoid too many return
statements within this method. Open
Open
return $tree;
Avoid too many return
statements within this method. Open
Open
return [
'name' => $key,
'type' => 'unchanged',
'value' => $objBefore->$key
];
Avoid too many return
statements within this method. Open
Open
return $result;
Avoid too many return
statements within this method. Open
Open
return "{$indent} + {$name}: {$added}";