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
699699 * The set can be another Finder, an Iterator, an IteratorAggregate, or even a plain array. 
700700 * 
701701 * @return $this 
702-  * 
703-  * @throws \InvalidArgumentException when the given argument is not iterable 
704702 */ 
705703 public  function  append (iterable  $ iterator ): static 
706704 {
707705 if  ($ iterator  instanceof  \IteratorAggregate) {
708706 $ this  ->iterators [] = $ iterator ->getIterator ();
709707 } elseif  ($ iterator  instanceof  \Iterator) {
710708 $ this  ->iterators [] = $ iterator ;
711-  } elseif  ( is_iterable ( $ iterator ))  {
709+  } else  {
712710 $ it  = new  \ArrayIterator ();
713711 foreach  ($ iterator  as  $ file ) {
714712 $ file  = $ file  instanceof  \SplFileInfo ? $ file  : new  \SplFileInfo ($ file );
715713 $ it [$ file ->getPathname ()] = $ file ;
716714 }
717715 $ this  ->iterators [] = $ it ;
718-  } else  {
719-  throw  new  \InvalidArgumentException ('Finder::append() method wrong argument type. ' );
720716 }
721717
722718 return  $ this  ;
                                 You can’t perform that action at this time. 
               
                  
0 commit comments