Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

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