Code Duplication    Length = 19-19 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3826-3844 (lines=19) @@
3823
     * @return false|mixed
3824
     *                     <p>Will return false if there are no values.</p>
3825
     */
3826
    public function max()
3827
    {
3828
        if ($this->count() === 0) {
3829
            return false;
3830
        }
3831
3832
        $max = false;
3833
        /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
3834
        foreach ($this->getGeneratorByReference() as &$value) {
3835
            if (
3836
                $max === false
3837
                ||
3838
                $value > $max
3839
            ) {
3840
                $max = $value;
3841
            }
3842
        }
3843
3844
        return $max;
3845
    }
3846
3847
    /**
@@ 3987-4005 (lines=19) @@
3984
     * @return false|mixed
3985
     *                     <p>Will return false if there are no values.</p>
3986
     */
3987
    public function min()
3988
    {
3989
        if ($this->count() === 0) {
3990
            return false;
3991
        }
3992
3993
        $min = false;
3994
        /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
3995
        foreach ($this->getGeneratorByReference() as &$value) {
3996
            if (
3997
                $min === false
3998
                ||
3999
                $value < $min
4000
            ) {
4001
                $min = $value;
4002
            }
4003
        }
4004
4005
        return $min;
4006
    }
4007
4008
    /**