Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3659-3674 (lines=16) @@
3656
     *
3657
     * @return bool
3658
     */
3659
    public function matches(\Closure $closure): bool
3660
    {
3661
        if ($this->count() === 0) {
3662
            return false;
3663
        }
3664
3665
        foreach ($this->getGenerator() as $key => $value) {
3666
            $value = $closure($value, $key);
3667
3668
            if ($value === false) {
3669
                return false;
3670
            }
3671
        }
3672
3673
        return true;
3674
    }
3675
3676
    /**
3677
     * Check if any item in the current array matches a truth test.
@@ 3683-3698 (lines=16) @@
3680
     *
3681
     * @return bool
3682
     */
3683
    public function matchesAny(\Closure $closure): bool
3684
    {
3685
        if ($this->count() === 0) {
3686
            return false;
3687
        }
3688
3689
        foreach ($this->getGenerator() as $key => $value) {
3690
            $value = $closure($value, $key);
3691
3692
            if ($value === true) {
3693
                return true;
3694
            }
3695
        }
3696
3697
        return false;
3698
    }
3699
3700
    /**
3701
     * Get the max value from an array.