create_function has been DEPRECATED as of PHP 7.2.0

This commit is contained in:
Hari KT 2019-12-11 12:50:54 +05:30
parent 190b1d74c9
commit 0a494a591f
2 changed files with 2 additions and 2 deletions

View File

@ -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());});
}
}

View File

@ -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());});
}
}