Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

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