@@ -29,20 +29,20 @@ |
||
29 | 29 | $amount = strpos($amount, '.') !== false ? $amount : $amount . '.0'; |
30 | 30 | |
31 | 31 | list($integerValue, $decimalValue) = explode('.', $amount); |
32 | - $intHTML = '<span class="money-int">'.number_format($integerValue).'</span>'; |
|
32 | + $intHTML = '<span class="money-int">' . number_format($integerValue) . '</span>'; |
|
33 | 33 | |
34 | 34 | $decimalValue = str_pad($decimalValue, 2, '0', STR_PAD_LEFT); |
35 | - $decimalHTML = '<sup class="money-decimal">.'.$decimalValue.'</sup>'; |
|
35 | + $decimalHTML = '<sup class="money-decimal">.' . $decimalValue . '</sup>'; |
|
36 | 36 | |
37 | - $return = $intHTML.$decimalHTML; |
|
37 | + $return = $intHTML . $decimalHTML; |
|
38 | 38 | |
39 | - $symbolHTML = '<span class="money-currency">'.$this->symbol.'</span>'; |
|
39 | + $symbolHTML = '<span class="money-currency">' . $this->symbol . '</span>'; |
|
40 | 40 | if ($this->position == 'before') { |
41 | - $return = $symbolHTML.' '.$amount; |
|
41 | + $return = $symbolHTML . ' ' . $amount; |
|
42 | 42 | } else { |
43 | - $return .= ' '.$symbolHTML; |
|
43 | + $return .= ' ' . $symbolHTML; |
|
44 | 44 | } |
45 | 45 | |
46 | - return '<span class="price" content="'.$amount.'">'.$return.'</span>'; |
|
46 | + return '<span class="price" content="' . $amount . '">' . $return . '</span>'; |
|
47 | 47 | } |
48 | 48 | } |
@@ -49,9 +49,9 @@ |
||
49 | 49 | 'nosimbol' => preg_match('/\!/', $fmatch[1]) > 0, |
50 | 50 | 'isleft' => preg_match('/\-/', $fmatch[1]) > 0, |
51 | 51 | ]; |
52 | - $width = trim($fmatch[2]) ? (int)$fmatch[2] : 0; |
|
53 | - $left = trim($fmatch[3]) ? (int)$fmatch[3] : 0; |
|
54 | - $right = trim($fmatch[4]) ? (int)$fmatch[4] : $locale['int_frac_digits']; |
|
52 | + $width = trim($fmatch[2]) ? (int) $fmatch[2] : 0; |
|
53 | + $left = trim($fmatch[3]) ? (int) $fmatch[3] : 0; |
|
54 | + $right = trim($fmatch[4]) ? (int) $fmatch[4] : $locale['int_frac_digits']; |
|
55 | 55 | $conversion = $fmatch[5]; |
56 | 56 | |
57 | 57 | $positive = true; |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | throw new InvalidArgumentException(sprintf('Invalid value: %s', json_encode($value))); |
67 | 67 | } |
68 | 68 | |
69 | - protected static function parseNonFloatStrings($value,$currency = null, $bitCointDigits = 2) |
|
69 | + protected static function parseNonFloatStrings($value, $currency = null, $bitCointDigits = 2) |
|
70 | 70 | { |
71 | 71 | $locale = static::getLocale(); |
72 | 72 | $currencies = static::getCurrencies(); |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | { |
131 | 131 | $parser = new DecimalMoneyParser($currencies ?: static::getCurrencies()); |
132 | 132 | |
133 | - return static::parseByParser($parser,(string) $money, $forceCurrency); |
|
133 | + return static::parseByParser($parser, (string) $money, $forceCurrency); |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | /** |
@@ -41,20 +41,20 @@ |
||
41 | 41 | |
42 | 42 | protected function registerCurrencies() |
43 | 43 | { |
44 | - $this->getContainer()->share(self::MONEY_CURRENCIES, function () { |
|
44 | + $this->getContainer()->share(self::MONEY_CURRENCIES, function() { |
|
45 | 45 | return new ISOCurrencies(); |
46 | 46 | }); |
47 | 47 | } |
48 | 48 | |
49 | 49 | protected function registerCurrency() |
50 | 50 | { |
51 | - $this->getContainer()->share('money.currency', function () { |
|
51 | + $this->getContainer()->share('money.currency', function() { |
|
52 | 52 | }); |
53 | 53 | } |
54 | 54 | |
55 | 55 | protected function registerFormatter() |
56 | 56 | { |
57 | - $this->getContainer()->share('money.formatter', function () { |
|
57 | + $this->getContainer()->share('money.formatter', function() { |
|
58 | 58 | return Manager::instance(); |
59 | 59 | }); |
60 | 60 | } |