Code Duplication    Length = 19-19 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3110-3128 (lines=19) @@
3107
     *
3108
     * @return mixed
3109
     */
3110
    public function max()
3111
    {
3112
        if ($this->count() === 0) {
3113
            return false;
3114
        }
3115
3116
        $max = false;
3117
        foreach ($this->getGenerator() as $value) {
3118
            if (
3119
                $max === false
3120
                ||
3121
                $value > $max
3122
            ) {
3123
                $max = $value;
3124
            }
3125
        }
3126
3127
        return $max;
3128
    }
3129
3130
    /**
3131
     * Merge the new $array into the current array.
@@ 3261-3279 (lines=19) @@
3258
     *
3259
     * @return mixed
3260
     */
3261
    public function min()
3262
    {
3263
        if ($this->count() === 0) {
3264
            return false;
3265
        }
3266
3267
        $min = false;
3268
        foreach ($this->getGenerator() as $value) {
3269
            if (
3270
                $min === false
3271
                ||
3272
                $value < $min
3273
            ) {
3274
                $min = $value;
3275
            }
3276
        }
3277
3278
        return $min;
3279
    }
3280
3281
    /**
3282
     * Get the most used value from the array.