Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2828-2843 (lines=16) @@
2825
     *
2826
     * @return bool
2827
     */
2828
    public function matches(\Closure $closure): bool
2829
    {
2830
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2831
            return false;
2832
        }
2833
2834
        foreach ($this->getGenerator() as $key => $value) {
2835
            $value = $closure($value, $key);
2836
2837
            if ($value === false) {
2838
                return false;
2839
            }
2840
        }
2841
2842
        return true;
2843
    }
2844
2845
    /**
2846
     * Check if any item in the current array matches a truth test.
@@ 2852-2867 (lines=16) @@
2849
     *
2850
     * @return bool
2851
     */
2852
    public function matchesAny(\Closure $closure): bool
2853
    {
2854
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2855
            return false;
2856
        }
2857
2858
        foreach ($this->getGenerator() as $key => $value) {
2859
            $value = $closure($value, $key);
2860
2861
            if ($value === true) {
2862
                return true;
2863
            }
2864
        }
2865
2866
        return false;
2867
    }
2868
2869
    /**
2870
     * Get the max value from an array.