Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3834-3849 (lines=16) @@
3831
     *
3832
     * @return bool
3833
     */
3834
    public function matches(\Closure $closure): bool
3835
    {
3836
        if ($this->count() === 0) {
3837
            return false;
3838
        }
3839
3840
        foreach ($this->getGenerator() as $key => $value) {
3841
            $value = $closure($value, $key);
3842
3843
            if ($value === false) {
3844
                return false;
3845
            }
3846
        }
3847
3848
        return true;
3849
    }
3850
3851
    /**
3852
     * Check if any item in the current array matches a truth test.
@@ 3858-3873 (lines=16) @@
3855
     *
3856
     * @return bool
3857
     */
3858
    public function matchesAny(\Closure $closure): bool
3859
    {
3860
        if ($this->count() === 0) {
3861
            return false;
3862
        }
3863
3864
        foreach ($this->getGenerator() as $key => $value) {
3865
            $value = $closure($value, $key);
3866
3867
            if ($value === true) {
3868
                return true;
3869
            }
3870
        }
3871
3872
        return false;
3873
    }
3874
3875
    /**
3876
     * Get the max value from an array.