Code Duplication    Length = 19-19 lines in 2 locations

src/Arrayy.php 2 locations

@@ 4328-4346 (lines=19) @@
4325
     * @return false|float|int|string
4326
     *                                <p>Will return false if there are no values.</p>
4327
     */
4328
    public function max()
4329
    {
4330
        if ($this->count() === 0) {
4331
            return false;
4332
        }
4333
4334
        $max = false;
4335
        /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
4336
        foreach ($this->getGeneratorByReference() as &$value) {
4337
            if (
4338
                $max === false
4339
                ||
4340
                $value > $max
4341
            ) {
4342
                $max = $value;
4343
            }
4344
        }
4345
4346
        return $max;
4347
    }
4348
4349
    /**
@@ 4533-4551 (lines=19) @@
4530
     * @return false|mixed
4531
     *                     <p>Will return false if there are no values.</p>
4532
     */
4533
    public function min()
4534
    {
4535
        if ($this->count() === 0) {
4536
            return false;
4537
        }
4538
4539
        $min = false;
4540
        /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
4541
        foreach ($this->getGeneratorByReference() as &$value) {
4542
            if (
4543
                $min === false
4544
                ||
4545
                $value < $min
4546
            ) {
4547
                $min = $value;
4548
            }
4549
        }
4550
4551
        return $min;
4552
    }
4553
4554
    /**