Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3612-3627 (lines=16) @@
3609
     *
3610
     * @return bool
3611
     */
3612
    public function matches(\Closure $closure): bool
3613
    {
3614
        if ($this->count() === 0) {
3615
            return false;
3616
        }
3617
3618
        foreach ($this->getGenerator() as $key => $value) {
3619
            $value = $closure($value, $key);
3620
3621
            if ($value === false) {
3622
                return false;
3623
            }
3624
        }
3625
3626
        return true;
3627
    }
3628
3629
    /**
3630
     * Check if any item in the current array matches a truth test.
@@ 3636-3651 (lines=16) @@
3633
     *
3634
     * @return bool
3635
     */
3636
    public function matchesAny(\Closure $closure): bool
3637
    {
3638
        if ($this->count() === 0) {
3639
            return false;
3640
        }
3641
3642
        foreach ($this->getGenerator() as $key => $value) {
3643
            $value = $closure($value, $key);
3644
3645
            if ($value === true) {
3646
                return true;
3647
            }
3648
        }
3649
3650
        return false;
3651
    }
3652
3653
    /**
3654
     * Get the max value from an array.