Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3543-3558 (lines=16) @@
3540
     *
3541
     * @return bool
3542
     */
3543
    public function matches(\Closure $closure): bool
3544
    {
3545
        if ($this->count() === 0) {
3546
            return false;
3547
        }
3548
3549
        foreach ($this->getGenerator() as $key => $value) {
3550
            $value = $closure($value, $key);
3551
3552
            if ($value === false) {
3553
                return false;
3554
            }
3555
        }
3556
3557
        return true;
3558
    }
3559
3560
    /**
3561
     * Check if any item in the current array matches a truth test.
@@ 3567-3582 (lines=16) @@
3564
     *
3565
     * @return bool
3566
     */
3567
    public function matchesAny(\Closure $closure): bool
3568
    {
3569
        if ($this->count() === 0) {
3570
            return false;
3571
        }
3572
3573
        foreach ($this->getGenerator() as $key => $value) {
3574
            $value = $closure($value, $key);
3575
3576
            if ($value === true) {
3577
                return true;
3578
            }
3579
        }
3580
3581
        return false;
3582
    }
3583
3584
    /**
3585
     * Get the max value from an array.