private static function roundHalfUp($amount)
    {
        $result = self::roundToNearestIntegerIgnoringTies($amount);

        if (null == $result) {
            $result = self::roundToNearestIntegerIgnoringTies(bcadd($amount, '0.1', self::BCSCALE));
        }

        return $result;
    }
private static function roundHalfUp($amount)
    {
        $result = self::roundToNearestIntegerIgnoringTies($amount);

        if (null == $result) {
            $result = self::roundToNearestIntegerIgnoringTies(bcadd($amount, '0.1', self::BCSCALE));
        }

        return $result;
    }
private static function roundHalfUp ( $ amount ) { $ result = self :: roundToNearestIntegerIgnoringTies ( $ amount ) ; if ( null == $ result ) { $ result = self :: roundToNearestIntegerIgnoringTies ( bcadd ( $ amount , '0.1' , self :: BCSCALE ) ) ; } return $ result ; }
If the fraction of the amount is exactly 0.5, then return the amount + 0.5.

@param string $amount the amount to round

@return string
If the fraction of the amount is exactly 0 . 5 then return the amount + 0 . 5 .