Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2374-2389 (lines=16) @@
2371
     *
2372
     * @return bool
2373
     */
2374
    public function matches(\Closure $closure): bool
2375
    {
2376
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2377
            return false;
2378
        }
2379
2380
        foreach ($this->getGenerator() as $key => $value) {
2381
            $value = $closure($value, $key);
2382
2383
            if ($value === false) {
2384
                return false;
2385
            }
2386
        }
2387
2388
        return true;
2389
    }
2390
2391
    /**
2392
     * Check if any item in the current array matches a truth test.
@@ 2398-2413 (lines=16) @@
2395
     *
2396
     * @return bool
2397
     */
2398
    public function matchesAny(\Closure $closure): bool
2399
    {
2400
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
2401
            return false;
2402
        }
2403
2404
        foreach ($this->getGenerator() as $key => $value) {
2405
            $value = $closure($value, $key);
2406
2407
            if ($value === true) {
2408
                return true;
2409
            }
2410
        }
2411
2412
        return false;
2413
    }
2414
2415
    /**
2416
     * Get the max value from an array.