Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 4125-4140 (lines=16) @@
4122
     *
4123
     * @return bool
4124
     */
4125
    public function matches(\Closure $closure): bool
4126
    {
4127
        if ($this->count() === 0) {
4128
            return false;
4129
        }
4130
4131
        foreach ($this->getGenerator() as $key => $value) {
4132
            $value = $closure($value, $key);
4133
4134
            if ($value === false) {
4135
                return false;
4136
            }
4137
        }
4138
4139
        return true;
4140
    }
4141
4142
    /**
4143
     * Check if any item in the current array matches a truth test.
@@ 4156-4171 (lines=16) @@
4153
     *
4154
     * @return bool
4155
     */
4156
    public function matchesAny(\Closure $closure): bool
4157
    {
4158
        if ($this->count() === 0) {
4159
            return false;
4160
        }
4161
4162
        foreach ($this->getGenerator() as $key => $value) {
4163
            $value = $closure($value, $key);
4164
4165
            if ($value === true) {
4166
                return true;
4167
            }
4168
        }
4169
4170
        return false;
4171
    }
4172
4173
    /**
4174
     * Get the max value from an array.