2 namespace wcf\system\option\user
;
3 use wcf\data\user\option\UserOption
;
4 use wcf\data\user\User
;
5 use wcf\util\StringUtil
;
8 * User option output implementation for the output of a float.
10 * @author Tobias Friebel
11 * @copyright 2001-2013 WoltLab GmbH
12 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
13 * @package com.woltlab.wcf.user
14 * @subpackage system.option.user
15 * @category Community Framework
17 class FloatUserOptionOutput
implements IUserOptionOutput
{
19 * @see wcf\system\option\user\IUserOptionOutput::getOutput()
21 public function getOutput(User
$user, UserOption
$option, $value) {
22 if (empty($value) ||
$value == '0') {
26 return StringUtil
::formatDouble($value, 2);