Browse Source

[Finder] simplified code

Fabien Potencier 14 years ago
parent
commit
f1f379b031
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/Symfony/Component/Finder/Iterator/SortableIterator.php

+ 2 - 3
src/Symfony/Component/Finder/Iterator/SortableIterator.php

@@ -49,9 +49,8 @@ class SortableIterator extends \ArrayIterator
             throw new \InvalidArgumentException(sprintf('The SortableIterator takes a \Closure or a valid built-in sort algorithm as an argument (%s given).', $sort));
         }
 
-        $array = new \ArrayObject(iterator_to_array($iterator));
-        $array->uasort($sort);
+        parent::__construct(iterator_to_array($iterator));
 
-        parent::__construct($array);
+        $this->uasort($sort);
     }
 }