Code Duplication    Length = 6-6 lines in 2 locations

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

@@ 52-57 (lines=6) @@
49
    public function __construct(/* \Iterator $iterable1, \Iterator $iterable2, ... */)
50
    {
51
        parent::__construct(\MultipleIterator::MIT_NEED_ALL| \MultipleIterator::MIT_KEYS_NUMERIC);
52
        foreach (func_get_args() as $iterable) {
53
            if (!$iterable instanceof \Iterator) {
54
                throw new \InvalidArgumentException(sprintf('Not all arguments are iterators'));
55
            }
56
            $this->attachIterator($iterable);
57
        }
58
        $this->key = 0;
59
    }
60

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

@@ 73-78 (lines=6) @@
70
    public function __construct(/* \Iterator $iterable, \Iterator $iterable2, ... */)
71
    {
72
        parent::__construct();
73
        foreach (func_get_args() as $iterable) {
74
            if (!$iterable instanceof \Iterator) {
75
                throw new \InvalidArgumentException(sprintf('Not all arguments are iterators'));
76
            }
77
            $this->append($iterable);
78
        }
79
    }
80
81
    /**