Code Duplication    Length = 11-11 lines in 2 locations

src/Zicht/Itertools/lib/Traits/ArrayAccessTrait.php 1 location

@@ 16-26 (lines=11) @@
13
     * @param mixed $offset
14
     * @return bool
15
     */
16
    public function offsetExists($offset)
17
    {
18
        if ($this instanceof \Traversable) {
19
            foreach ($this as $key => $_) {
20
                if ($key === $offset) {
21
                    return true;
22
                }
23
            }
24
        }
25
        return false;
26
    }
27
28
    /**
29
     * Returns the value of a key with the same type and value as $OFFSET, or returns

src/Zicht/Itertools/lib/Traits/GetterTrait.php 1 location

@@ 16-26 (lines=11) @@
13
     * @param mixed $offset
14
     * @return bool
15
     */
16
    public function has($offset)
17
    {
18
        if ($this instanceof \Traversable) {
19
            foreach ($this as $key => $_) {
20
                if ($key === $offset) {
21
                    return true;
22
                }
23
            }
24
        }
25
        return false;
26
    }
27
28
    /**
29
     * Returns the value of a key with the same type and value as $OFFSET, or returns