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
        }
@@ 2652-2658 (lines=7) @@
2649
            return $fallback instanceof \Closure ? $fallback() : $fallback;
2650
        }
2651
2652
        if (\is_array($usedArray) === true) {
2653
            return static::create(
2654
                [],
2655
                $this->iteratorClass,
2656
                false
2657
            )->createByReference($usedArray);
2658
        }
2659
2660
        return $usedArray;
2661
    }