@@ -83,7 +83,7 @@ |
||
83 | 83 | public function translate(Translator $translator, $count = NULL, array $parameters = [], $domain = NULL, $locale = NULL): string |
84 | 84 | { |
85 | 85 | if (!is_string($this->message)) { |
86 | - throw new \Kdyby\Translation\InvalidStateException('Message is not a string, type ' . gettype($this->message) . ' given.'); |
|
86 | + throw new \Kdyby\Translation\InvalidStateException('Message is not a string, type '.gettype($this->message).' given.'); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | $count = ($count !== NULL) ? (int) $count : $this->count; |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | |
170 | 170 | $tmp = []; |
171 | 171 | foreach ($parameters as $key => $val) { |
172 | - $tmp['%' . trim($key, '%') . '%'] = $val; |
|
172 | + $tmp['%'.trim($key, '%').'%'] = $val; |
|
173 | 173 | } |
174 | 174 | $parameters = $tmp; |
175 | 175 | |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | */ |
340 | 340 | public function setLocale($locale) |
341 | 341 | { |
342 | - parent::setLocale((string)$locale); |
|
342 | + parent::setLocale((string) $locale); |
|
343 | 343 | } |
344 | 344 | |
345 | 345 | /** |
@@ -475,7 +475,7 @@ discard block |
||
475 | 475 | */ |
476 | 476 | public static function buildWhitelistRegexp($whitelist) |
477 | 477 | { |
478 | - return ($whitelist !== NULL) ? '~^(' . implode('|', $whitelist) . ')~i' : NULL; |
|
478 | + return ($whitelist !== NULL) ? '~^('.implode('|', $whitelist).')~i' : NULL; |
|
479 | 479 | } |
480 | 480 | |
481 | 481 | } |