Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3446-3461 (lines=16) @@
3443
     *
3444
     * @return bool
3445
     */
3446
    public function matches(\Closure $closure): bool
3447
    {
3448
        if ($this->count() === 0) {
3449
            return false;
3450
        }
3451
3452
        foreach ($this->getGenerator() as $key => $value) {
3453
            $value = $closure($value, $key);
3454
3455
            if ($value === false) {
3456
                return false;
3457
            }
3458
        }
3459
3460
        return true;
3461
    }
3462
3463
    /**
3464
     * Check if any item in the current array matches a truth test.
@@ 3470-3485 (lines=16) @@
3467
     *
3468
     * @return bool
3469
     */
3470
    public function matchesAny(\Closure $closure): bool
3471
    {
3472
        if ($this->count() === 0) {
3473
            return false;
3474
        }
3475
3476
        foreach ($this->getGenerator() as $key => $value) {
3477
            $value = $closure($value, $key);
3478
3479
            if ($value === true) {
3480
                return true;
3481
            }
3482
        }
3483
3484
        return false;
3485
    }
3486
3487
    /**
3488
     * Get the max value from an array.