Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2645-2660 (lines=16) @@
2642
     *
2643
     * @return bool
2644
     */
2645
    public function matches(\Closure $closure): bool
2646
    {
2647
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2648
            return false;
2649
        }
2650
2651
        foreach ($this->getGenerator() as $key => $value) {
2652
            $value = $closure($value, $key);
2653
2654
            if ($value === false) {
2655
                return false;
2656
            }
2657
        }
2658
2659
        return true;
2660
    }
2661
2662
    /**
2663
     * Check if any item in the current array matches a truth test.
@@ 2669-2684 (lines=16) @@
2666
     *
2667
     * @return bool
2668
     */
2669
    public function matchesAny(\Closure $closure): bool
2670
    {
2671
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2672
            return false;
2673
        }
2674
2675
        foreach ($this->getGenerator() as $key => $value) {
2676
            $value = $closure($value, $key);
2677
2678
            if ($value === true) {
2679
                return true;
2680
            }
2681
        }
2682
2683
        return false;
2684
    }
2685
2686
    /**
2687
     * Get the max value from an array.