Code Duplication    Length = 19-19 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3659-3677 (lines=19) @@
3656
     * @return false|mixed
3657
     *                     <p>Will return false if there are no values.</p>
3658
     */
3659
    public function max()
3660
    {
3661
        if ($this->count() === 0) {
3662
            return false;
3663
        }
3664
3665
        $max = false;
3666
        foreach ($this->getGeneratorByReference() as &$value) {
3667
            if (
3668
                $max === false
3669
                ||
3670
                $value > $max
3671
            ) {
3672
                $max = $value;
3673
            }
3674
        }
3675
3676
        return $max;
3677
    }
3678
3679
    /**
3680
     * Merge the new $array into the current array.
@@ 3819-3837 (lines=19) @@
3816
     * @return false|mixed
3817
     *                     <p>Will return false if there are no values.</p>
3818
     */
3819
    public function min()
3820
    {
3821
        if ($this->count() === 0) {
3822
            return false;
3823
        }
3824
3825
        $min = false;
3826
        foreach ($this->getGeneratorByReference() as &$value) {
3827
            if (
3828
                $min === false
3829
                ||
3830
                $value < $min
3831
            ) {
3832
                $min = $value;
3833
            }
3834
        }
3835
3836
        return $min;
3837
    }
3838
3839
    /**
3840
     * Get the most used value from the array.