@@ -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; |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | public static function fromFloat($value, $currency = null) |
| 18 | 18 | { |
| 19 | 19 | $currency = static::currency($currency); |
| 20 | - return new \Money\Money($value*100, $currency); |
|
| 20 | + return new \Money\Money($value * 100, $currency); |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -40,20 +40,20 @@ |
||
| 40 | 40 | |
| 41 | 41 | protected function registerCurrencies() |
| 42 | 42 | { |
| 43 | - $this->getContainer()->share('money.currencies', function () { |
|
| 43 | + $this->getContainer()->share('money.currencies', function() { |
|
| 44 | 44 | return new ISOCurrencies(); |
| 45 | 45 | }); |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | protected function registerCurrency() |
| 49 | 49 | { |
| 50 | - $this->getContainer()->share('money.currency', function () { |
|
| 50 | + $this->getContainer()->share('money.currency', function() { |
|
| 51 | 51 | }); |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | protected function registerFormatter() |
| 55 | 55 | { |
| 56 | - $this->getContainer()->share('money.formatter', function () { |
|
| 56 | + $this->getContainer()->share('money.formatter', function() { |
|
| 57 | 57 | return Manager::instance(); |
| 58 | 58 | }); |
| 59 | 59 | } |