@@ -132,18 +132,18 @@ discard block |
||
| 132 | 132 | if ($formatter === null) { |
| 133 | 133 | // formatter may be null in PHP 5.x |
| 134 | 134 | $this->_errorCode = intl_get_error_code(); |
| 135 | - $this->_errorMessage = 'Message pattern is invalid: ' . intl_get_error_message(); |
|
| 135 | + $this->_errorMessage = 'Message pattern is invalid: '.intl_get_error_message(); |
|
| 136 | 136 | return false; |
| 137 | 137 | } |
| 138 | 138 | } catch (\IntlException $e) { |
| 139 | 139 | // IntlException is thrown since PHP 7 |
| 140 | 140 | $this->_errorCode = $e->getCode(); |
| 141 | - $this->_errorMessage = 'Message pattern is invalid: ' . $e->getMessage(); |
|
| 141 | + $this->_errorMessage = 'Message pattern is invalid: '.$e->getMessage(); |
|
| 142 | 142 | return false; |
| 143 | 143 | } catch (\Exception $e) { |
| 144 | 144 | // Exception is thrown by HHVM |
| 145 | 145 | $this->_errorCode = $e->getCode(); |
| 146 | - $this->_errorMessage = 'Message pattern is invalid: ' . $e->getMessage(); |
|
| 146 | + $this->_errorMessage = 'Message pattern is invalid: '.$e->getMessage(); |
|
| 147 | 147 | return false; |
| 148 | 148 | } |
| 149 | 149 | |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | $map[$param] = count($map); |
| 196 | 196 | } |
| 197 | 197 | $token[0] = $map[$param]; |
| 198 | - $tokens[$i] = '{' . implode(',', $token) . '}'; |
|
| 198 | + $tokens[$i] = '{'.implode(',', $token).'}'; |
|
| 199 | 199 | } |
| 200 | 200 | } |
| 201 | 201 | $pattern = implode('', $tokens); |
@@ -271,11 +271,11 @@ discard block |
||
| 271 | 271 | return false; |
| 272 | 272 | } |
| 273 | 273 | $subpattern = $this->replaceNamedArguments(implode(',', $subtokens[$k]), $givenParams, $resultingParams, $map); |
| 274 | - $subtokens[$k] = $quote . '{' . $quote . $subpattern . $quote . '}' . $quote; |
|
| 274 | + $subtokens[$k] = $quote.'{'.$quote.$subpattern.$quote.'}'.$quote; |
|
| 275 | 275 | } |
| 276 | 276 | $token[2] = implode('', $subtokens); |
| 277 | 277 | } |
| 278 | - $tokens[$i] = $quote . '{' . $quote . implode(',', $token) . $quote . '}' . $quote; |
|
| 278 | + $tokens[$i] = $quote.'{'.$quote.implode(',', $token).$quote.'}'.$quote; |
|
| 279 | 279 | } |
| 280 | 280 | |
| 281 | 281 | return implode('', $tokens); |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | if (isset($args[$param])) { |
| 375 | 375 | $arg = $args[$param]; |
| 376 | 376 | } else { |
| 377 | - return '{' . implode(',', $token) . '}'; |
|
| 377 | + return '{'.implode(',', $token).'}'; |
|
| 378 | 378 | } |
| 379 | 379 | $type = isset($token[1]) ? trim($token[1]) : 'none'; |
| 380 | 380 | switch ($type) { |
@@ -392,7 +392,7 @@ discard block |
||
| 392 | 392 | $number = number_format($arg); |
| 393 | 393 | if ($format === null && ($pos = strpos($arg, '.')) !== false) { |
| 394 | 394 | // add decimals with unknown length |
| 395 | - $number .= '.' . substr($arg, $pos + 1); |
|
| 395 | + $number .= '.'.substr($arg, $pos + 1); |
|
| 396 | 396 | } |
| 397 | 397 | |
| 398 | 398 | return $number; |
@@ -446,11 +446,11 @@ discard block |
||
| 446 | 446 | $selector = trim($plural[$i++]); |
| 447 | 447 | |
| 448 | 448 | if ($i == 1 && strncmp($selector, 'offset:', 7) === 0) { |
| 449 | - $offset = (int) trim(mb_substr($selector, 7, ($pos = mb_strpos(str_replace(["\n", "\r", "\t"], ' ', $selector), ' ', 7, $charset)) - 7, $charset)); |
|
| 449 | + $offset = (int)trim(mb_substr($selector, 7, ($pos = mb_strpos(str_replace(["\n", "\r", "\t"], ' ', $selector), ' ', 7, $charset)) - 7, $charset)); |
|
| 450 | 450 | $selector = trim(mb_substr($selector, $pos + 1, mb_strlen($selector, $charset), $charset)); |
| 451 | 451 | } |
| 452 | 452 | if ($message === false && $selector === 'other' || |
| 453 | - $selector[0] === '=' && (int) mb_substr($selector, 1, mb_strlen($selector, $charset), $charset) === $arg || |
|
| 453 | + $selector[0] === '=' && (int)mb_substr($selector, 1, mb_strlen($selector, $charset), $charset) === $arg || |
|
| 454 | 454 | $selector === 'one' && $arg - $offset == 1 |
| 455 | 455 | ) { |
| 456 | 456 | $message = implode(',', str_replace('#', $arg - $offset, $plural[$i])); |