Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

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