Code Duplication    Length = 19-19 lines in 2 locations

src/Arrayy.php 2 locations

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