Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3774-3789 (lines=16) @@
3771
     *
3772
     * @return bool
3773
     */
3774
    public function matches(\Closure $closure): bool
3775
    {
3776
        if ($this->count() === 0) {
3777
            return false;
3778
        }
3779
3780
        foreach ($this->getGenerator() as $key => $value) {
3781
            $value = $closure($value, $key);
3782
3783
            if ($value === false) {
3784
                return false;
3785
            }
3786
        }
3787
3788
        return true;
3789
    }
3790
3791
    /**
3792
     * Check if any item in the current array matches a truth test.
@@ 3798-3813 (lines=16) @@
3795
     *
3796
     * @return bool
3797
     */
3798
    public function matchesAny(\Closure $closure): bool
3799
    {
3800
        if ($this->count() === 0) {
3801
            return false;
3802
        }
3803
3804
        foreach ($this->getGenerator() as $key => $value) {
3805
            $value = $closure($value, $key);
3806
3807
            if ($value === true) {
3808
                return true;
3809
            }
3810
        }
3811
3812
        return false;
3813
    }
3814
3815
    /**
3816
     * Get the max value from an array.