Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2591-2606 (lines=16) @@
2588
     *
2589
     * @return bool
2590
     */
2591
    public function matches(\Closure $closure): bool
2592
    {
2593
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2594
            return false;
2595
        }
2596
2597
        foreach ($this->getGenerator() as $key => $value) {
2598
            $value = $closure($value, $key);
2599
2600
            if ($value === false) {
2601
                return false;
2602
            }
2603
        }
2604
2605
        return true;
2606
    }
2607
2608
    /**
2609
     * Check if any item in the current array matches a truth test.
@@ 2615-2630 (lines=16) @@
2612
     *
2613
     * @return bool
2614
     */
2615
    public function matchesAny(\Closure $closure): bool
2616
    {
2617
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2618
            return false;
2619
        }
2620
2621
        foreach ($this->getGenerator() as $key => $value) {
2622
            $value = $closure($value, $key);
2623
2624
            if ($value === true) {
2625
                return true;
2626
            }
2627
        }
2628
2629
        return false;
2630
    }
2631
2632
    /**
2633
     * Get the max value from an array.