diff --git a/src/RateAdapter.php b/src/RateAdapter.php index 6ed0a6f..087c0d9 100644 --- a/src/RateAdapter.php +++ b/src/RateAdapter.php @@ -95,6 +95,6 @@ abstract class RateAdapter 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());}); } } diff --git a/src/Ship.php b/src/Ship.php index 0ce4c50..570cc82 100644 --- a/src/Ship.php +++ b/src/Ship.php @@ -141,6 +141,6 @@ class Ship 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());}); } }