Skip to content

Commit

Permalink
minor #5523 DX: EregToPregFixer - fix sorting (keradus)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.18 branch.

Discussion
----------

DX: EregToPregFixer - fix sorting

Commits
-------

99f3360 DX: EregToPregFixer - fix sorting
  • Loading branch information
keradus committed Mar 2, 2021
2 parents a2aee2f + 99f3360 commit 6d1e66f
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 6d1e66f

Please sign in to comment.