Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

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