Skip to content

Commit

Permalink
Use spaceship operator for comparing values (terminal42#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
bytehead authored Nov 9, 2023
1 parent e05642f commit 5359e73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Helper/LanguageText.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static function (NavigationItem $a, NavigationItem $b) use ($languages) {
$key1 = array_search(strtolower($a->getLanguageTag()), $languages, true);
$key2 = array_search(strtolower($b->getLanguageTag()), $languages, true);

return $key1 < $key2 ? -1 : 1;
return $key1 <=> $key2;
}
);
}
Expand Down

0 comments on commit 5359e73

Please sign in to comment.