Some code cleanup courtesy of PHPStorm.

This commit is contained in:
James Cole
2016-01-15 18:21:59 +01:00
parent f69be86c74
commit dcbfe90cf7
8 changed files with 43 additions and 21 deletions

View File

@@ -29,9 +29,9 @@ class Amount
*/
public function formatAnything(TransactionCurrency $format, $amount, $coloured = true)
{
$locale = setlocale(LC_MONETARY, 0);
$a = new NumberFormatter($locale, NumberFormatter::CURRENCY);
$result = $a->formatCurrency($amount, $format->code);
$locale = setlocale(LC_MONETARY, 0);
$formatter = new NumberFormatter($locale, NumberFormatter::CURRENCY);
$result = $formatter->formatCurrency($amount, $format->code);
if ($coloured === true) {
if ($amount == 0) {