Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

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