Code Duplication    Length = 14-14 lines in 2 locations

src/Traits/StrictIterableTrait.php 1 location

@@ 76-89 (lines=14) @@
73
     * {@inheritDoc}
74
     * @return $this
75
     */
76
    public function zip(Iterable $iterable)
77
    {
78
        $res = new static();
79
        $it = $iterable->getIterator();
80
        foreach ($this as $v) {
81
            if (!$it->valid()) {
82
                break;
83
            }
84
            $res[] = new Pair($v, $it->current());
85
            $it->next();
86
        }
87
88
        return $res;
89
    }
90
91
    /**
92
     * {@inheritDoc}

src/Traits/StrictKeyedIterableTrait.php 1 location

@@ 67-80 (lines=14) @@
64
        return $res;
65
    }
66
67
    public function zip($iterable)
68
    {
69
        $res = new static();
70
        $it = $iterable->getIterator();
71
        foreach ($this as $k => $v) {
72
            if (!$it->valid()) {
73
                break;
74
            }
75
            $res[$k] = new Pair($v, $it->current());
76
            $it->next();
77
        }
78
79
        return $res;
80
    }
81
82
    public function take($size = 1)
83
    {