Skip to content

Commit

Permalink
"Parameter #2 $callback of function uksort expects callable(int|strin…
Browse files Browse the repository at this point in the history
…g, int|string): int, Closure(string, string): int<-1, 1> given." fix.
  • Loading branch information
LastDragon-ru committed Nov 6, 2021
1 parent d35a1bc commit 40dafaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/testing/src/Comparators/DatabaseQueryComparator.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ protected function normalize(Query $query): Query {
$matches = array_values($matches);
$matches = array_flip($matches);

uksort($matches, static function (string $a, string $b): int {
return strlen($b) <=> strlen($a);
uksort($matches, static function (string|int $a, string|int $b): int {
return strlen((string) $b) <=> strlen((string) $a);
});

foreach ($matches as $match => $index) {
Expand Down

0 comments on commit 40dafaa

Please sign in to comment.