We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ad9684 commit 13a9c43Copy full SHA for 13a9c43
app/code/Magento/Quote/Model/Quote/Address.php
@@ -872,13 +872,7 @@ public function getGroupedAllShippingRates()
872
*/
873
protected function _sortRates($firstItem, $secondItem)
874
{
875
- if ((int)$firstItem[0]->carrier_sort_order < (int)$secondItem[0]->carrier_sort_order) {
876
- return -1;
877
- } elseif ((int)$firstItem[0]->carrier_sort_order > (int)$secondItem[0]->carrier_sort_order) {
878
- return 1;
879
- } else {
880
- return 0;
881
- }
+ return (int) $firstItem[0]->carrier_sort_order <=> (int) $secondItem[0]->carrier_sort_order;
882
}
883
884
/**
0 commit comments