Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2756-2771 (lines=16) @@
2753
     *
2754
     * @return bool
2755
     */
2756
    public function matches(\Closure $closure): bool
2757
    {
2758
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2759
            return false;
2760
        }
2761
2762
        foreach ($this->getGenerator() as $key => $value) {
2763
            $value = $closure($value, $key);
2764
2765
            if ($value === false) {
2766
                return false;
2767
            }
2768
        }
2769
2770
        return true;
2771
    }
2772
2773
    /**
2774
     * Check if any item in the current array matches a truth test.
@@ 2780-2795 (lines=16) @@
2777
     *
2778
     * @return bool
2779
     */
2780
    public function matchesAny(\Closure $closure): bool
2781
    {
2782
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2783
            return false;
2784
        }
2785
2786
        foreach ($this->getGenerator() as $key => $value) {
2787
            $value = $closure($value, $key);
2788
2789
            if ($value === true) {
2790
                return true;
2791
            }
2792
        }
2793
2794
        return false;
2795
    }
2796
2797
    /**
2798
     * Get the max value from an array.