Skip to content

Commit

Permalink
- refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
alexndlm committed Oct 15, 2023
1 parent 501f687 commit bc39224
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 0 additions & 6 deletions src/ArrayComparator.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,5 @@ private function canonicalize(array &$array): void
} else {
ksort($array);
}

foreach ($array as &$element) {
if (is_array($element)) {
$this->canonicalize($element);
}
}
}
}
4 changes: 2 additions & 2 deletions tests/ArrayComparatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ public static function assertEqualsSucceedsProvider()
[true],
],
[
['a', 'b' => [1, 2]],
['b' => [2, 1], 'a'],
['a', 'b' => [1, 2], 'c' => [1, 2, 'd' => [1, 2]]],
['c' => [1, 'd' => [2, 1], 2], 'b' => [2, 1], 'a'],
0,
true,
],
Expand Down

0 comments on commit bc39224

Please sign in to comment.