Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2895-2910 (lines=16) @@
2892
     *
2893
     * @return bool
2894
     */
2895
    public function matches(\Closure $closure): bool
2896
    {
2897
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2898
            return false;
2899
        }
2900
2901
        foreach ($this->getGenerator() as $key => $value) {
2902
            $value = $closure($value, $key);
2903
2904
            if ($value === false) {
2905
                return false;
2906
            }
2907
        }
2908
2909
        return true;
2910
    }
2911
2912
    /**
2913
     * Check if any item in the current array matches a truth test.
@@ 2919-2934 (lines=16) @@
2916
     *
2917
     * @return bool
2918
     */
2919
    public function matchesAny(\Closure $closure): bool
2920
    {
2921
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2922
            return false;
2923
        }
2924
2925
        foreach ($this->getGenerator() as $key => $value) {
2926
            $value = $closure($value, $key);
2927
2928
            if ($value === true) {
2929
                return true;
2930
            }
2931
        }
2932
2933
        return false;
2934
    }
2935
2936
    /**
2937
     * Get the max value from an array.