Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2790-2805 (lines=16) @@
2787
     *
2788
     * @return bool
2789
     */
2790
    public function matches(\Closure $closure): bool
2791
    {
2792
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2793
            return false;
2794
        }
2795
2796
        foreach ($this->getGenerator() as $key => $value) {
2797
            $value = $closure($value, $key);
2798
2799
            if ($value === false) {
2800
                return false;
2801
            }
2802
        }
2803
2804
        return true;
2805
    }
2806
2807
    /**
2808
     * Check if any item in the current array matches a truth test.
@@ 2814-2829 (lines=16) @@
2811
     *
2812
     * @return bool
2813
     */
2814
    public function matchesAny(\Closure $closure): bool
2815
    {
2816
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2817
            return false;
2818
        }
2819
2820
        foreach ($this->getGenerator() as $key => $value) {
2821
            $value = $closure($value, $key);
2822
2823
            if ($value === true) {
2824
                return true;
2825
            }
2826
        }
2827
2828
        return false;
2829
    }
2830
2831
    /**
2832
     * Get the max value from an array.