Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2456-2471 (lines=16) @@
2453
     *
2454
     * @return bool
2455
     */
2456
    public function matches(\Closure $closure): bool
2457
    {
2458
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2459
            return false;
2460
        }
2461
2462
        foreach ($this->getGenerator() as $key => $value) {
2463
            $value = $closure($value, $key);
2464
2465
            if ($value === false) {
2466
                return false;
2467
            }
2468
        }
2469
2470
        return true;
2471
    }
2472
2473
    /**
2474
     * Check if any item in the current array matches a truth test.
@@ 2480-2495 (lines=16) @@
2477
     *
2478
     * @return bool
2479
     */
2480
    public function matchesAny(\Closure $closure): bool
2481
    {
2482
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2483
            return false;
2484
        }
2485
2486
        foreach ($this->getGenerator() as $key => $value) {
2487
            $value = $closure($value, $key);
2488
2489
            if ($value === true) {
2490
                return true;
2491
            }
2492
        }
2493
2494
        return false;
2495
    }
2496
2497
    /**
2498
     * Get the max value from an array.