Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2884-2899 (lines=16) @@
2881
     *
2882
     * @return bool
2883
     */
2884
    public function matches(\Closure $closure): bool
2885
    {
2886
        if ($this->count() === 0) {
2887
            return false;
2888
        }
2889
2890
        foreach ($this->getGenerator() as $key => $value) {
2891
            $value = $closure($value, $key);
2892
2893
            if ($value === false) {
2894
                return false;
2895
            }
2896
        }
2897
2898
        return true;
2899
    }
2900
2901
    /**
2902
     * Check if any item in the current array matches a truth test.
@@ 2908-2923 (lines=16) @@
2905
     *
2906
     * @return bool
2907
     */
2908
    public function matchesAny(\Closure $closure): bool
2909
    {
2910
        if ($this->count() === 0) {
2911
            return false;
2912
        }
2913
2914
        foreach ($this->getGenerator() as $key => $value) {
2915
            $value = $closure($value, $key);
2916
2917
            if ($value === true) {
2918
                return true;
2919
            }
2920
        }
2921
2922
        return false;
2923
    }
2924
2925
    /**
2926
     * Get the max value from an array.