Jelle-S/arraykeycombiner

View on GitHub
src/ArrayKeyCombiner.php

Summary

Maintainability
A
3 hrs
Test Coverage

Showing 3 of 3 total issues

Function combineIdentical has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

protected function combineIdentical($arrays) {
// Check for identical items in the array and merge them.
foreach ($arrays as &$sort) {
asort($sort);
}
Severity: Minor
Found in src/ArrayKeyCombiner.php - About 1 hr to fix

Function combineIntersections has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

protected function combineIntersections(&$arrays, $intersections) {
$changed = FALSE;
foreach ($intersections as $intersection) {
$size = count($intersection);
$keys = [];
Severity: Minor
Found in src/ArrayKeyCombiner.php - About 1 hr to fix

Avoid using Jelle_S\Util\Combiner\count() function in do loops.
Open

do {
$i = new ArrayIntersections($arrays, $this->threshold, $this->intersectionIterationsLimit);
$intersections = $i->getAll();
if (!$intersections) {
break;
Severity: Minor
Found in src/ArrayKeyCombiner.php by phpmd

There are no issues that match your filters.

Category
Status