lion0k/project-lvl2-s385

View on GitHub
src/differ.php

Summary

Maintainability
A
1 hr
Test Coverage

Method makeDiff has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function makeDiff($data1, $data2)
{
    $arrUniqKeys = array_unique(array_merge(array_keys($data1), array_keys($data2)));
    $result = array_reduce($arrUniqKeys, function ($acc, $key) use ($data1, $data2) {
        if (array_key_exists($key, $data1) && array_key_exists($key, $data2)) {
Severity: Minor
Found in src/differ.php - About 1 hr to fix

    Method buildDataStructure has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function buildDataStructure($typeInfo, $nameKey, $oldValue, $newValue, $children = null)
    Severity: Minor
    Found in src/differ.php - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status