Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2513-2528 (lines=16) @@
2510
     *
2511
     * @return bool
2512
     */
2513
    public function matches(\Closure $closure): bool
2514
    {
2515
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2516
            return false;
2517
        }
2518
2519
        foreach ($this->getGenerator() as $key => $value) {
2520
            $value = $closure($value, $key);
2521
2522
            if ($value === false) {
2523
                return false;
2524
            }
2525
        }
2526
2527
        return true;
2528
    }
2529
2530
    /**
2531
     * Check if any item in the current array matches a truth test.
@@ 2537-2552 (lines=16) @@
2534
     *
2535
     * @return bool
2536
     */
2537
    public function matchesAny(\Closure $closure): bool
2538
    {
2539
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2540
            return false;
2541
        }
2542
2543
        foreach ($this->getGenerator() as $key => $value) {
2544
            $value = $closure($value, $key);
2545
2546
            if ($value === true) {
2547
                return true;
2548
            }
2549
        }
2550
2551
        return false;
2552
    }
2553
2554
    /**
2555
     * Get the max value from an array.