Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3576-3591 (lines=16) @@
3573
     *
3574
     * @return bool
3575
     */
3576
    public function matches(\Closure $closure): bool
3577
    {
3578
        if ($this->count() === 0) {
3579
            return false;
3580
        }
3581
3582
        foreach ($this->getGenerator() as $key => $value) {
3583
            $value = $closure($value, $key);
3584
3585
            if ($value === false) {
3586
                return false;
3587
            }
3588
        }
3589
3590
        return true;
3591
    }
3592
3593
    /**
3594
     * Check if any item in the current array matches a truth test.
@@ 3600-3615 (lines=16) @@
3597
     *
3598
     * @return bool
3599
     */
3600
    public function matchesAny(\Closure $closure): bool
3601
    {
3602
        if ($this->count() === 0) {
3603
            return false;
3604
        }
3605
3606
        foreach ($this->getGenerator() as $key => $value) {
3607
            $value = $closure($value, $key);
3608
3609
            if ($value === true) {
3610
                return true;
3611
            }
3612
        }
3613
3614
        return false;
3615
    }
3616
3617
    /**
3618
     * Get the max value from an array.