mvaload/difference-calculator

View on GitHub
src/differ.php

Summary

Maintainability
A
2 hrs
Test Coverage

Method buildDiff has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function buildDiff($arr1, $arr2)
{
    $keys = array_merge(array_keys($arr1), array_keys($arr2));
    $uniqueKeys = array_values(array_unique($keys));

Severity: Minor
Found in src/differ.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

            return [
                'key' => $key,
                'type' => 'fixed',
                'valueBefore' => $arr1[$key],
            ];
    Severity: Major
    Found in src/differ.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

          return $tree;
      Severity: Major
      Found in src/differ.php - About 30 mins to fix

        There are no issues that match your filters.

        Category
        Status