Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

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