Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2535-2550 (lines=16) @@
2532
     *
2533
     * @return bool
2534
     */
2535
    public function matches(\Closure $closure): bool
2536
    {
2537
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2538
            return false;
2539
        }
2540
2541
        foreach ($this->getGenerator() as $key => $value) {
2542
            $value = $closure($value, $key);
2543
2544
            if ($value === false) {
2545
                return false;
2546
            }
2547
        }
2548
2549
        return true;
2550
    }
2551
2552
    /**
2553
     * Check if any item in the current array matches a truth test.
@@ 2559-2574 (lines=16) @@
2556
     *
2557
     * @return bool
2558
     */
2559
    public function matchesAny(\Closure $closure): bool
2560
    {
2561
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2562
            return false;
2563
        }
2564
2565
        foreach ($this->getGenerator() as $key => $value) {
2566
            $value = $closure($value, $key);
2567
2568
            if ($value === true) {
2569
                return true;
2570
            }
2571
        }
2572
2573
        return false;
2574
    }
2575
2576
    /**
2577
     * Get the max value from an array.