Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

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