Code Duplication    Length = 6-6 lines in 2 locations

src/Zicht/Itertools/lib/ChainIterator.php 1 location

@@ 28-33 (lines=6) @@
25
    public function __construct()
26
    {
27
        parent::__construct();
28
        foreach (func_get_args() as $iterable) {
29
            if (!$iterable instanceof \Iterator) {
30
                throw new \InvalidArgumentException(sprintf('Not all arguments are iterators'));
31
            }
32
            $this->append($iterable);
33
        }
34
    }
35
36
    /**

src/Zicht/Itertools/lib/ZipIterator.php 1 location

@@ 30-35 (lines=6) @@
27
    public function __construct()
28
    {
29
        parent::__construct(\MultipleIterator::MIT_NEED_ALL | \MultipleIterator::MIT_KEYS_NUMERIC);
30
        foreach (func_get_args() as $iterable) {
31
            if (!$iterable instanceof \Iterator) {
32
                throw new \InvalidArgumentException(sprintf('Not all arguments are iterators'));
33
            }
34
            $this->attachIterator($iterable);
35
        }
36
        $this->key = 0;
37
    }
38