create_function has been DEPRECATED as of PHP 7.2.0

pull/19/head
Hari KT 4 years ago
parent 190b1d74c9
commit 0a494a591f

@ -95,6 +95,6 @@ abstract class RateAdapter
protected function sortByCost() protected function sortByCost()
{ {
uasort($this->rates, create_function('$a, $b', 'return ($a->getCost() > $b->getCost());')); uasort($this->rates, function ($a, $b) { return ($a->getCost() > $b->getCost());});
} }
} }

@ -141,6 +141,6 @@ class Ship
protected function sortByCost(& $rates) protected function sortByCost(& $rates)
{ {
uasort($rates, create_function('$a, $b', 'return ($a->getCost() > $b->getCost());')); uasort($rates, function ($a, $b) { return ($a->getCost() > $b->getCost());});
} }
} }

Loading…
Cancel
Save