@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | $number = str_replace('-', '-'.$currency->value, $number); |
| 34 | 34 | $number = str_replace('+', '+'.$currency->value, $number); |
| 35 | 35 | } else { |
| 36 | - $number = $currency->value . $number; |
|
| 36 | + $number = $currency->value.$number; |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | return $number; |
@@ -71,14 +71,14 @@ discard block |
||
| 71 | 71 | $number = $wholePart; |
| 72 | 72 | |
| 73 | 73 | if ($decimalPart) { |
| 74 | - $number .= self::getRadixCharacter($format) . $decimalPart; |
|
| 74 | + $number .= self::getRadixCharacter($format).$decimalPart; |
|
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | if (str_contains($posNegChar, '\N')) { |
| 79 | 79 | $number = str_replace('\N', $number, $posNegChar); |
| 80 | 80 | } else { |
| 81 | - $number = $posNegChar . $number; |
|
| 81 | + $number = $posNegChar.$number; |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | return $number; |
@@ -107,17 +107,17 @@ discard block |
||
| 107 | 107 | if ($wholeSizeNonZero) { |
| 108 | 108 | $exponent = $wholeSizeNonZero; |
| 109 | 109 | $exponent -= 1; |
| 110 | - $mantissa = substr($wholePart, 0, 1) . '.' . substr($wholePart, 1) . $decimalPart; |
|
| 110 | + $mantissa = substr($wholePart, 0, 1).'.'.substr($wholePart, 1).$decimalPart; |
|
| 111 | 111 | } else { |
| 112 | - $exponent = strlen($decimalPart) - $decimalSizeNonZero; |
|
| 112 | + $exponent = strlen($decimalPart)-$decimalSizeNonZero; |
|
| 113 | 113 | $exponent += 1; |
| 114 | - $mantissa = substr($decimalPart, $exponent-1, 1) . '.' . substr($decimalPart, $exponent); |
|
| 114 | + $mantissa = substr($decimalPart, $exponent-1, 1).'.'.substr($decimalPart, $exponent); |
|
| 115 | 115 | $exponent *= -1; |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | $mantissa = rtrim($mantissa, '0'); |
| 119 | 119 | |
| 120 | - return $negative . $mantissa . 'E' . $exponent . $imaginary; |
|
| 120 | + return $negative.$mantissa.'E'.$exponent.$imaginary; |
|
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | /** |
@@ -137,18 +137,18 @@ discard block |
||
| 137 | 137 | $formatted = ''; |
| 138 | 138 | |
| 139 | 139 | for ($i = 0;$i < count($numberArr);$i++) { |
| 140 | - $j = $i + 1; |
|
| 140 | + $j = $i+1; |
|
| 141 | 141 | |
| 142 | 142 | $formatted = $numberArr[$i].$formatted; |
| 143 | 143 | |
| 144 | 144 | if ($grouping == NumberGrouping::Standard) { |
| 145 | - if ($j % 3 == 0 && array_key_exists($i+1, $numberArr)) { |
|
| 145 | + if ($j%3 == 0 && array_key_exists($i+1, $numberArr)) { |
|
| 146 | 146 | $formatted = self::getDelimiterCharacter($format).$formatted; |
| 147 | 147 | } |
| 148 | 148 | } elseif ($grouping == NumberGrouping::Indian) { |
| 149 | 149 | if ($j == 3 && array_key_exists($i+1, $numberArr)) { |
| 150 | 150 | $formatted = self::getDelimiterCharacter($format).$formatted; |
| 151 | - } elseif (($j - 3) % 2 == 0 && ($j - 3) > 0 && array_key_exists($i+1, $numberArr)) { |
|
| 151 | + } elseif (($j-3)%2 == 0 && ($j-3) > 0 && array_key_exists($i+1, $numberArr)) { |
|
| 152 | 152 | $formatted = self::getDelimiterCharacter($format).$formatted; |
| 153 | 153 | } |
| 154 | 154 | } |