Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

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