Browse Source

Rename another $value variable.

Sacrifice to the PHP7.2 gods.
Mark Story 8 years ago
parent
commit
1e166f8b00
1 changed files with 5 additions and 5 deletions
  1. 5 5
      src/Collection/Iterator/SortIterator.php

+ 5 - 5
src/Collection/Iterator/SortIterator.php

@@ -65,12 +65,12 @@ class SortIterator extends Collection
 
         $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);