Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3761-3776 (lines=16) @@
3758
     *
3759
     * @return bool
3760
     */
3761
    public function matches(\Closure $closure): bool
3762
    {
3763
        if ($this->count() === 0) {
3764
            return false;
3765
        }
3766
3767
        foreach ($this->getGenerator() as $key => $value) {
3768
            $value = $closure($value, $key);
3769
3770
            if ($value === false) {
3771
                return false;
3772
            }
3773
        }
3774
3775
        return true;
3776
    }
3777
3778
    /**
3779
     * Check if any item in the current array matches a truth test.
@@ 3785-3800 (lines=16) @@
3782
     *
3783
     * @return bool
3784
     */
3785
    public function matchesAny(\Closure $closure): bool
3786
    {
3787
        if ($this->count() === 0) {
3788
            return false;
3789
        }
3790
3791
        foreach ($this->getGenerator() as $key => $value) {
3792
            $value = $closure($value, $key);
3793
3794
            if ($value === true) {
3795
                return true;
3796
            }
3797
        }
3798
3799
        return false;
3800
    }
3801
3802
    /**
3803
     * Get the max value from an array.