Merge branch '4.3' into 4.4
* 4.3: fix merge
This commit is contained in:
commit
5d4a3a16e0
@ -73,8 +73,7 @@ class SortableIterator implements \IteratorAggregate
|
||||
} elseif (self::SORT_BY_NONE === $sort) {
|
||||
$this->sort = $order;
|
||||
} elseif (\is_callable($sort)) {
|
||||
$this->sort = $reverseOrder ? function ($a, $b) use ($sort) { return -$sort($a, $b); }
|
||||
: $sort;
|
||||
$this->sort = $reverseOrder ? static function ($a, $b) use ($sort) { return -$sort($a, $b); } : $sort;
|
||||
} else {
|
||||
throw new \InvalidArgumentException('The SortableIterator takes a PHP callable or a valid built-in sort algorithm as an argument.');
|
||||
}
|
||||
|
Reference in New Issue
Block a user