Code Duplication    Length = 19-19 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3493-3511 (lines=19) @@
3490
     * @return false|mixed
3491
     *                     <p>Will return false if there are no values.</p>
3492
     */
3493
    public function max()
3494
    {
3495
        if ($this->count() === 0) {
3496
            return false;
3497
        }
3498
3499
        $max = false;
3500
        foreach ($this->getGenerator() as $value) {
3501
            if (
3502
                $max === false
3503
                ||
3504
                $value > $max
3505
            ) {
3506
                $max = $value;
3507
            }
3508
        }
3509
3510
        return $max;
3511
    }
3512
3513
    /**
3514
     * Merge the new $array into the current array.
@@ 3649-3667 (lines=19) @@
3646
     * @return false|mixed
3647
     *                     <p>Will return false if there are no values.</p>
3648
     */
3649
    public function min()
3650
    {
3651
        if ($this->count() === 0) {
3652
            return false;
3653
        }
3654
3655
        $min = false;
3656
        foreach ($this->getGenerator() as $value) {
3657
            if (
3658
                $min === false
3659
                ||
3660
                $value < $min
3661
            ) {
3662
                $min = $value;
3663
            }
3664
        }
3665
3666
        return $min;
3667
    }
3668
3669
    /**
3670
     * Get the most used value from the array.