Code Duplication    Length = 16-16 lines in 2 locations

src/Arrayy.php 2 locations

@@ 4016-4031 (lines=16) @@
4013
     *
4014
     * @return bool
4015
     */
4016
    public function matches(\Closure $closure): bool
4017
    {
4018
        if ($this->count() === 0) {
4019
            return false;
4020
        }
4021
4022
        foreach ($this->getGenerator() as $key => $value) {
4023
            $value = $closure($value, $key);
4024
4025
            if ($value === false) {
4026
                return false;
4027
            }
4028
        }
4029
4030
        return true;
4031
    }
4032
4033
    /**
4034
     * Check if any item in the current array matches a truth test.
@@ 4047-4062 (lines=16) @@
4044
     *
4045
     * @return bool
4046
     */
4047
    public function matchesAny(\Closure $closure): bool
4048
    {
4049
        if ($this->count() === 0) {
4050
            return false;
4051
        }
4052
4053
        foreach ($this->getGenerator() as $key => $value) {
4054
            $value = $closure($value, $key);
4055
4056
            if ($value === true) {
4057
                return true;
4058
            }
4059
        }
4060
4061
        return false;
4062
    }
4063
4064
    /**
4065
     * Get the max value from an array.