Code Duplication    Length = 19-19 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3498-3516 (lines=19) @@
3495
     * @return false|mixed
3496
     *                     <p>Will return false if there are no values.</p>
3497
     */
3498
    public function max()
3499
    {
3500
        if ($this->count() === 0) {
3501
            return false;
3502
        }
3503
3504
        $max = false;
3505
        foreach ($this->getGenerator() as $value) {
3506
            if (
3507
                $max === false
3508
                ||
3509
                $value > $max
3510
            ) {
3511
                $max = $value;
3512
            }
3513
        }
3514
3515
        return $max;
3516
    }
3517
3518
    /**
3519
     * Merge the new $array into the current array.
@@ 3654-3672 (lines=19) @@
3651
     * @return false|mixed
3652
     *                     <p>Will return false if there are no values.</p>
3653
     */
3654
    public function min()
3655
    {
3656
        if ($this->count() === 0) {
3657
            return false;
3658
        }
3659
3660
        $min = false;
3661
        foreach ($this->getGenerator() as $value) {
3662
            if (
3663
                $min === false
3664
                ||
3665
                $value < $min
3666
            ) {
3667
                $min = $value;
3668
            }
3669
        }
3670
3671
        return $min;
3672
    }
3673
3674
    /**
3675
     * Get the most used value from the array.