Skip to content

Commit

Permalink
Use is_iterable() function when possible
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz authored and Tobion committed Jul 17, 2021
1 parent cbf2e51 commit 860a301
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Finder.php
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ public function append($iterator)
$this->iterators[] = $iterator->getIterator();
} elseif ($iterator instanceof \Iterator) {
$this->iterators[] = $iterator;
} elseif ($iterator instanceof \Traversable || \is_array($iterator)) {
} elseif (is_iterable($iterator)) {
$it = new \ArrayIterator();
foreach ($iterator as $file) {
$file = $file instanceof \SplFileInfo ? $file : new \SplFileInfo($file);
Expand Down

0 comments on commit 860a301

Please sign in to comment.