Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3399-3414 (lines=16) @@
3396
     *
3397
     * @return bool
3398
     */
3399
    public function matches(\Closure $closure): bool
3400
    {
3401
        if ($this->count() === 0) {
3402
            return false;
3403
        }
3404
3405
        foreach ($this->getGenerator() as $key => $value) {
3406
            $value = $closure($value, $key);
3407
3408
            if ($value === false) {
3409
                return false;
3410
            }
3411
        }
3412
3413
        return true;
3414
    }
3415
3416
    /**
3417
     * Check if any item in the current array matches a truth test.
@@ 3423-3438 (lines=16) @@
3420
     *
3421
     * @return bool
3422
     */
3423
    public function matchesAny(\Closure $closure): bool
3424
    {
3425
        if ($this->count() === 0) {
3426
            return false;
3427
        }
3428
3429
        foreach ($this->getGenerator() as $key => $value) {
3430
            $value = $closure($value, $key);
3431
3432
            if ($value === true) {
3433
                return true;
3434
            }
3435
        }
3436
3437
        return false;
3438
    }
3439
3440
    /**
3441
     * Get the max value from an array.