Code Duplication    Length = 7-7 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2547-2553 (lines=7) @@
2544
        }
2545
2546
        if (\array_key_exists($key, $usedArray) === true) {
2547
            if (\is_array($usedArray[$key]) === true) {
2548
                return static::create(
2549
                    [],
2550
                    $this->iteratorClass,
2551
                    false
2552
                )->createByReference($usedArray[$key]);
2553
            }
2554
2555
            return $usedArray[$key];
2556
        }
@@ 2670-2676 (lines=7) @@
2667
            return $fallback instanceof \Closure ? $fallback() : $fallback;
2668
        }
2669
2670
        if (\is_array($usedArray) === true) {
2671
            return static::create(
2672
                [],
2673
                $this->iteratorClass,
2674
                false
2675
            )->createByReference($usedArray);
2676
        }
2677
2678
        return $usedArray;
2679
    }