Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 4222-4237 (lines=16) @@
4219
     *
4220
     * @return bool
4221
     */
4222
    public function matches(\Closure $closure): bool
4223
    {
4224
        if ($this->count() === 0) {
4225
            return false;
4226
        }
4227
4228
        foreach ($this->getGenerator() as $key => $value) {
4229
            $value = $closure($value, $key);
4230
4231
            if ($value === false) {
4232
                return false;
4233
            }
4234
        }
4235
4236
        return true;
4237
    }
4238
4239
    /**
4240
     * Check if any item in the current array matches a truth test.
@@ 4253-4268 (lines=16) @@
4250
     *
4251
     * @return bool
4252
     */
4253
    public function matchesAny(\Closure $closure): bool
4254
    {
4255
        if ($this->count() === 0) {
4256
            return false;
4257
        }
4258
4259
        foreach ($this->getGenerator() as $key => $value) {
4260
            $value = $closure($value, $key);
4261
4262
            if ($value === true) {
4263
                return true;
4264
            }
4265
        }
4266
4267
        return false;
4268
    }
4269
4270
    /**
4271
     * Get the max value from an array.