Skip to content

Commit

Permalink
DX: EregToPregFixer - fix sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus committed Mar 1, 2021
1 parent c73f1b8 commit 99f3360
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Fixer/Alias/EregToPregFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ private function getBestDelimiter($pattern)
}

// return the least used delimiter, using the position in the list as a tie breaker
uasort($delimiters, static function ($a, $b) {
uasort($delimiters, static function (array $a, array $b) {
if ($a[0] === $b[0]) {
return Utils::cmpInt($a, $b);
return Utils::cmpInt($a[1], $b[1]);
}

return $a[0] < $b[0] ? -1 : 1;
Expand Down

0 comments on commit 99f3360

Please sign in to comment.