Skip to content
Permalink
Browse files

Rename another $value variable.

Sacrifice to the PHP7.2 gods.
  • Loading branch information...
markstory committed Sep 30, 2017
1 parent 5166013 commit 1e166f8b00bd50104e95d2fa69ab8f0605a3631b
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/Collection/Iterator/SortIterator.php
@@ -65,12 +65,12 @@ public function __construct($items, $callback, $dir = SORT_DESC, $type = SORT_NU
$callback = $this->_propertyExtractor($callback);
$results = [];
foreach ($items as $key => $value) {
$value = $callback($value);
if ($value instanceof DateTimeInterface && $type === SORT_NUMERIC) {
$value = $value->format('U');
foreach ($items as $key => $val) {
$val = $callback($val);
if ($val instanceof DateTimeInterface && $type === SORT_NUMERIC) {
$val = $val->format('U');
}
$results[$key] = $value;
$results[$key] = $val;
}
$dir === SORT_DESC ? arsort($results, $type) : asort($results, $type);

0 comments on commit 1e166f8

Please sign in to comment.
You can’t perform that action at this time.