Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

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