Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2945-2960 (lines=16) @@
2942
     *
2943
     * @return bool
2944
     */
2945
    public function matches(\Closure $closure): bool
2946
    {
2947
        if ($this->count() === 0) {
2948
            return false;
2949
        }
2950
2951
        foreach ($this->getGenerator() as $key => $value) {
2952
            $value = $closure($value, $key);
2953
2954
            if ($value === false) {
2955
                return false;
2956
            }
2957
        }
2958
2959
        return true;
2960
    }
2961
2962
    /**
2963
     * Check if any item in the current array matches a truth test.
@@ 2969-2984 (lines=16) @@
2966
     *
2967
     * @return bool
2968
     */
2969
    public function matchesAny(\Closure $closure): bool
2970
    {
2971
        if ($this->count() === 0) {
2972
            return false;
2973
        }
2974
2975
        foreach ($this->getGenerator() as $key => $value) {
2976
            $value = $closure($value, $key);
2977
2978
            if ($value === true) {
2979
                return true;
2980
            }
2981
        }
2982
2983
        return false;
2984
    }
2985
2986
    /**
2987
     * Get the max value from an array.