Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2776-2791 (lines=16) @@
2773
     *
2774
     * @return bool
2775
     */
2776
    public function matches(\Closure $closure): bool
2777
    {
2778
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2779
            return false;
2780
        }
2781
2782
        foreach ($this->getGenerator() as $key => $value) {
2783
            $value = $closure($value, $key);
2784
2785
            if ($value === false) {
2786
                return false;
2787
            }
2788
        }
2789
2790
        return true;
2791
    }
2792
2793
    /**
2794
     * Check if any item in the current array matches a truth test.
@@ 2800-2815 (lines=16) @@
2797
     *
2798
     * @return bool
2799
     */
2800
    public function matchesAny(\Closure $closure): bool
2801
    {
2802
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2803
            return false;
2804
        }
2805
2806
        foreach ($this->getGenerator() as $key => $value) {
2807
            $value = $closure($value, $key);
2808
2809
            if ($value === true) {
2810
                return true;
2811
            }
2812
        }
2813
2814
        return false;
2815
    }
2816
2817
    /**
2818
     * Get the max value from an array.