Code Duplication    Length = 19-19 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3593-3611 (lines=19) @@
3590
     * @return false|mixed
3591
     *                     <p>Will return false if there are no values.</p>
3592
     */
3593
    public function max()
3594
    {
3595
        if ($this->count() === 0) {
3596
            return false;
3597
        }
3598
3599
        $max = false;
3600
        foreach ($this->getGenerator() as $value) {
3601
            if (
3602
                $max === false
3603
                ||
3604
                $value > $max
3605
            ) {
3606
                $max = $value;
3607
            }
3608
        }
3609
3610
        return $max;
3611
    }
3612
3613
    /**
3614
     * Merge the new $array into the current array.
@@ 3753-3771 (lines=19) @@
3750
     * @return false|mixed
3751
     *                     <p>Will return false if there are no values.</p>
3752
     */
3753
    public function min()
3754
    {
3755
        if ($this->count() === 0) {
3756
            return false;
3757
        }
3758
3759
        $min = false;
3760
        foreach ($this->getGenerator() as $value) {
3761
            if (
3762
                $min === false
3763
                ||
3764
                $value < $min
3765
            ) {
3766
                $min = $value;
3767
            }
3768
        }
3769
3770
        return $min;
3771
    }
3772
3773
    /**
3774
     * Get the most used value from the array.