Permalink
Browse files

[Finder] simplified code

  • Loading branch information...
1 parent d795b96 commit 0d1d024b8c520174d77c9027cc52349a9ce4b6fb @fabpot fabpot committed May 6, 2011
Showing with 2 additions and 3 deletions.
  1. +2 −3 Iterator/SortableIterator.php
@@ -49,9 +49,8 @@ public function __construct(\Iterator $iterator, $sort)
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);
}
}

0 comments on commit 0d1d024

Please sign in to comment.