Showing 8 of 8 total issues
Method genDiffFromArrays
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function genDiffFromArrays(array $arr1, array $arr2): array
{
$mergedAndSortedArrays = mergeAndSortArrays($arr1, $arr2);
return array_map(function ($nodeData) use ($arr1, $arr2) {
if (!key_exists($nodeData['nodeKey'], $arr1) && key_exists($nodeData['nodeKey'], $arr2)) {
Method stylishMapping
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function stylishMapping(array $resultDiffArr): array
{
$stylishResult = array_map(function ($node): array {
if (array_key_exists('diffStatus', $node)) {
switch ($node['diffStatus']) {
Avoid too many return
statements within this method. Open
Open
return "'$value'";
Avoid too many return
statements within this method. Open
Open
return $flattenedStylishResult;
Avoid too many return
statements within this method. Open
Open
return [];
Avoid too many return
statements within this method. Open
Open
return implode("\n", $filteredPlainResultArr);
Avoid too many return
statements within this method. Open
Open
return '';
Avoid too many return
statements within this method. Open
Open
return [" " . $node['nodeKey'] => $childRecurs];