Code Duplication    Length = 19-19 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3580-3598 (lines=19) @@
3577
     * @return false|mixed
3578
     *                     <p>Will return false if there are no values.</p>
3579
     */
3580
    public function max()
3581
    {
3582
        if ($this->count() === 0) {
3583
            return false;
3584
        }
3585
3586
        $max = false;
3587
        foreach ($this->getGenerator() as $value) {
3588
            if (
3589
                $max === false
3590
                ||
3591
                $value > $max
3592
            ) {
3593
                $max = $value;
3594
            }
3595
        }
3596
3597
        return $max;
3598
    }
3599
3600
    /**
3601
     * Merge the new $array into the current array.
@@ 3740-3758 (lines=19) @@
3737
     * @return false|mixed
3738
     *                     <p>Will return false if there are no values.</p>
3739
     */
3740
    public function min()
3741
    {
3742
        if ($this->count() === 0) {
3743
            return false;
3744
        }
3745
3746
        $min = false;
3747
        foreach ($this->getGenerator() as $value) {
3748
            if (
3749
                $min === false
3750
                ||
3751
                $value < $min
3752
            ) {
3753
                $min = $value;
3754
            }
3755
        }
3756
3757
        return $min;
3758
    }
3759
3760
    /**
3761
     * Get the most used value from the array.