File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -699,24 +699,20 @@ public function getIterator(): \Iterator
699
699
* The set can be another Finder, an Iterator, an IteratorAggregate, or even a plain array.
700
700
*
701
701
* @return $this
702
- *
703
- * @throws \InvalidArgumentException when the given argument is not iterable
704
702
*/
705
703
public function append (iterable $ iterator ): static
706
704
{
707
705
if ($ iterator instanceof \IteratorAggregate) {
708
706
$ this ->iterators [] = $ iterator ->getIterator ();
709
707
} elseif ($ iterator instanceof \Iterator) {
710
708
$ this ->iterators [] = $ iterator ;
711
- } elseif ( is_iterable ( $ iterator )) {
709
+ } else {
712
710
$ it = new \ArrayIterator ();
713
711
foreach ($ iterator as $ file ) {
714
712
$ file = $ file instanceof \SplFileInfo ? $ file : new \SplFileInfo ($ file );
715
713
$ it [$ file ->getPathname ()] = $ file ;
716
714
}
717
715
$ this ->iterators [] = $ it ;
718
- } else {
719
- throw new \InvalidArgumentException ('Finder::append() method wrong argument type. ' );
720
716
}
721
717
722
718
return $ this ;
You can’t perform that action at this time.
0 commit comments