Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2810-2825 (lines=16) @@
2807
     *
2808
     * @return bool
2809
     */
2810
    public function matches(\Closure $closure): bool
2811
    {
2812
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2813
            return false;
2814
        }
2815
2816
        foreach ($this->getGenerator() as $key => $value) {
2817
            $value = $closure($value, $key);
2818
2819
            if ($value === false) {
2820
                return false;
2821
            }
2822
        }
2823
2824
        return true;
2825
    }
2826
2827
    /**
2828
     * Check if any item in the current array matches a truth test.
@@ 2834-2849 (lines=16) @@
2831
     *
2832
     * @return bool
2833
     */
2834
    public function matchesAny(\Closure $closure): bool
2835
    {
2836
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2837
            return false;
2838
        }
2839
2840
        foreach ($this->getGenerator() as $key => $value) {
2841
            $value = $closure($value, $key);
2842
2843
            if ($value === true) {
2844
                return true;
2845
            }
2846
        }
2847
2848
        return false;
2849
    }
2850
2851
    /**
2852
     * Get the max value from an array.