Commit 9427f4e7 by Vincent Gabriel

no need for as number #2524

parent e311cd00
...@@ -412,7 +412,6 @@ class Formatter extends Component ...@@ -412,7 +412,6 @@ class Formatter extends Component
* @return string the formatted result * @return string the formatted result
* @see decimalSeparator * @see decimalSeparator
* @see thousandSeparator * @see thousandSeparator
* @see asNumber
*/ */
public function asSize($value, $decimals = 0) public function asSize($value, $decimals = 0)
{ {
...@@ -428,6 +427,6 @@ class Formatter extends Component ...@@ -428,6 +427,6 @@ class Formatter extends Component
$position++; $position++;
} while ($position < count($units)); } while ($position < count($units));
return $this->asNumber($value, $decimals) . Yii::t('yii', end($units)); return number_format($value, $decimals) . Yii::t('yii', end($units));
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment