Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2748-2763 (lines=16) @@
2745
     *
2746
     * @return bool
2747
     */
2748
    public function matches(\Closure $closure): bool
2749
    {
2750
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2751
            return false;
2752
        }
2753
2754
        foreach ($this->getGenerator() as $key => $value) {
2755
            $value = $closure($value, $key);
2756
2757
            if ($value === false) {
2758
                return false;
2759
            }
2760
        }
2761
2762
        return true;
2763
    }
2764
2765
    /**
2766
     * Check if any item in the current array matches a truth test.
@@ 2772-2787 (lines=16) @@
2769
     *
2770
     * @return bool
2771
     */
2772
    public function matchesAny(\Closure $closure): bool
2773
    {
2774
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2775
            return false;
2776
        }
2777
2778
        foreach ($this->getGenerator() as $key => $value) {
2779
            $value = $closure($value, $key);
2780
2781
            if ($value === true) {
2782
                return true;
2783
            }
2784
        }
2785
2786
        return false;
2787
    }
2788
2789
    /**
2790
     * Get the max value from an array.