Code Duplication    Length = 19-19 lines in 2 locations

src/Arrayy.php 2 locations

@@ 4193-4211 (lines=19) @@
4190
     * @return false|mixed
4191
     *                     <p>Will return false if there are no values.</p>
4192
     */
4193
    public function max()
4194
    {
4195
        if ($this->count() === 0) {
4196
            return false;
4197
        }
4198
4199
        $max = false;
4200
        /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
4201
        foreach ($this->getGeneratorByReference() as &$value) {
4202
            if (
4203
                $max === false
4204
                ||
4205
                $value > $max
4206
            ) {
4207
                $max = $value;
4208
            }
4209
        }
4210
4211
        return $max;
4212
    }
4213
4214
    /**
@@ 4398-4416 (lines=19) @@
4395
     * @return false|mixed
4396
     *                     <p>Will return false if there are no values.</p>
4397
     */
4398
    public function min()
4399
    {
4400
        if ($this->count() === 0) {
4401
            return false;
4402
        }
4403
4404
        $min = false;
4405
        /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
4406
        foreach ($this->getGeneratorByReference() as &$value) {
4407
            if (
4408
                $min === false
4409
                ||
4410
                $value < $min
4411
            ) {
4412
                $min = $value;
4413
            }
4414
        }
4415
4416
        return $min;
4417
    }
4418
4419
    /**