Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3533-3548 (lines=16) @@
3530
     *
3531
     * @return bool
3532
     */
3533
    public function matches(\Closure $closure): bool
3534
    {
3535
        if ($this->count() === 0) {
3536
            return false;
3537
        }
3538
3539
        foreach ($this->getGenerator() as $key => $value) {
3540
            $value = $closure($value, $key);
3541
3542
            if ($value === false) {
3543
                return false;
3544
            }
3545
        }
3546
3547
        return true;
3548
    }
3549
3550
    /**
3551
     * Check if any item in the current array matches a truth test.
@@ 3557-3572 (lines=16) @@
3554
     *
3555
     * @return bool
3556
     */
3557
    public function matchesAny(\Closure $closure): bool
3558
    {
3559
        if ($this->count() === 0) {
3560
            return false;
3561
        }
3562
3563
        foreach ($this->getGenerator() as $key => $value) {
3564
            $value = $closure($value, $key);
3565
3566
            if ($value === true) {
3567
                return true;
3568
            }
3569
        }
3570
3571
        return false;
3572
    }
3573
3574
    /**
3575
     * Get the max value from an array.