@@ -11,17 +11,17 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | class PluginNumberFormat extends Plugin implements ICompilable |
| 13 | 13 | { |
| 14 | - /** |
|
| 15 | - * @param Compiler $compiler |
|
| 16 | - * @param float $value |
|
| 17 | - * @param int $decimals |
|
| 18 | - * @param string $dec_point |
|
| 19 | - * @param string $thousands_sep |
|
| 20 | - * |
|
| 21 | - * @return string |
|
| 22 | - */ |
|
| 23 | - public static function compile(Compiler $compiler, $value, $decimals = 0, $dec_point = ".", $thousands_sep = ",") |
|
| 24 | - { |
|
| 25 | - return 'number_format(' . $value . ',' . $decimals . ',' . $dec_point . ',' . $thousands_sep . ')'; |
|
| 26 | - } |
|
| 14 | + /** |
|
| 15 | + * @param Compiler $compiler |
|
| 16 | + * @param float $value |
|
| 17 | + * @param int $decimals |
|
| 18 | + * @param string $dec_point |
|
| 19 | + * @param string $thousands_sep |
|
| 20 | + * |
|
| 21 | + * @return string |
|
| 22 | + */ |
|
| 23 | + public static function compile(Compiler $compiler, $value, $decimals = 0, $dec_point = ".", $thousands_sep = ",") |
|
| 24 | + { |
|
| 25 | + return 'number_format(' . $value . ',' . $decimals . ',' . $dec_point . ',' . $thousands_sep . ')'; |
|
| 26 | + } |
|
| 27 | 27 | } |
@@ -20,8 +20,8 @@ |
||
| 20 | 20 | * |
| 21 | 21 | * @return string |
| 22 | 22 | */ |
| 23 | - public static function compile(Compiler $compiler, $value, $decimals = 0, $dec_point = ".", $thousands_sep = ",") |
|
| 23 | + public static function compile(Compiler $compiler, $value, $decimals = 0, $dec_point = ".", $thousands_sep = ",") |
|
| 24 | 24 | { |
| 25 | - return 'number_format(' . $value . ',' . $decimals . ',' . $dec_point . ',' . $thousands_sep . ')'; |
|
| 25 | + return 'number_format('.$value.','.$decimals.','.$dec_point.','.$thousands_sep.')'; |
|
| 26 | 26 | } |
| 27 | 27 | } |