Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

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