Code Duplication    Length = 19-19 lines in 2 locations

src/Arrayy.php 2 locations

@@ 4280-4298 (lines=19) @@
4277
     * @return false|mixed
4278
     *                     <p>Will return false if there are no values.</p>
4279
     */
4280
    public function max()
4281
    {
4282
        if ($this->count() === 0) {
4283
            return false;
4284
        }
4285
4286
        $max = false;
4287
        /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
4288
        foreach ($this->getGeneratorByReference() as &$value) {
4289
            if (
4290
                $max === false
4291
                ||
4292
                $value > $max
4293
            ) {
4294
                $max = $value;
4295
            }
4296
        }
4297
4298
        return $max;
4299
    }
4300
4301
    /**
@@ 4485-4503 (lines=19) @@
4482
     * @return false|mixed
4483
     *                     <p>Will return false if there are no values.</p>
4484
     */
4485
    public function min()
4486
    {
4487
        if ($this->count() === 0) {
4488
            return false;
4489
        }
4490
4491
        $min = false;
4492
        /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
4493
        foreach ($this->getGeneratorByReference() as &$value) {
4494
            if (
4495
                $min === false
4496
                ||
4497
                $value < $min
4498
            ) {
4499
                $min = $value;
4500
            }
4501
        }
4502
4503
        return $min;
4504
    }
4505
4506
    /**