@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | |
| 183 | 183 | $tmp = []; |
| 184 | 184 | foreach ($parameters as $key => $val) { |
| 185 | - $tmp['%' . trim($key, '%') . '%'] = $val; |
|
| 185 | + $tmp['%'.trim($key, '%').'%'] = $val; |
|
| 186 | 186 | } |
| 187 | 187 | $parameters = $tmp; |
| 188 | 188 | |
@@ -514,7 +514,7 @@ discard block |
||
| 514 | 514 | */ |
| 515 | 515 | public static function buildWhitelistRegexp($whitelist) |
| 516 | 516 | { |
| 517 | - return ($whitelist !== NULL) ? '~^(' . implode('|', $whitelist) . ')~i' : NULL; |
|
| 517 | + return ($whitelist !== NULL) ? '~^('.implode('|', $whitelist).')~i' : NULL; |
|
| 518 | 518 | } |
| 519 | 519 | |
| 520 | 520 | } |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | * Translates the given string. |
| 137 | 137 | * |
| 138 | 138 | * @param string|\Kdyby\Translation\Phrase|mixed $message The message id |
| 139 | - * @param int|array|NULL $count The number to use to find the indice of the message |
|
| 139 | + * @param integer|null $count The number to use to find the indice of the message |
|
| 140 | 140 | * @param string|array|NULL $parameters An array of parameters for the message |
| 141 | 141 | * @param string|NULL $domain The domain for the message |
| 142 | 142 | * @param string|NULL $locale The locale |
@@ -197,6 +197,8 @@ discard block |
||
| 197 | 197 | |
| 198 | 198 | /** |
| 199 | 199 | * {@inheritdoc} |
| 200 | + * @param string $domain |
|
| 201 | + * @param string $locale |
|
| 200 | 202 | */ |
| 201 | 203 | public function trans($message, array $parameters = [], $domain = NULL, $locale = NULL) |
| 202 | 204 | { |
@@ -224,6 +226,8 @@ discard block |
||
| 224 | 226 | |
| 225 | 227 | /** |
| 226 | 228 | * {@inheritdoc} |
| 229 | + * @param string $domain |
|
| 230 | + * @param string $locale |
|
| 227 | 231 | */ |
| 228 | 232 | public function transChoice($message, $number, array $parameters = [], $domain = NULL, $locale = NULL) |
| 229 | 233 | { |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | public function translate(Translator $translator, $count = NULL, array $parameters = [], $domain = NULL, $locale = NULL) |
| 94 | 94 | { |
| 95 | 95 | if (!is_string($this->message)) { |
| 96 | - throw new InvalidStateException("Message is not a string, type " . gettype($this->message) . ' given.'); |
|
| 96 | + throw new InvalidStateException("Message is not a string, type ".gettype($this->message).' given.'); |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | $count = ($count !== NULL) ? (int) $count : $this->count; |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | |
| 71 | 71 | if ($token->name === '/_' || ($token->name === '_' && $token->closing === TRUE)) { |
| 72 | 72 | if ($buffer !== NULL) { |
| 73 | - $catalogue->set(($this->prefix ? $this->prefix . '.' : '') . $buffer, $buffer); |
|
| 73 | + $catalogue->set(($this->prefix ? $this->prefix.'.' : '').$buffer, $buffer); |
|
| 74 | 74 | $buffer = NULL; |
| 75 | 75 | } |
| 76 | 76 | |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | $message = substr(trim($message), 1, -1); |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | - $catalogue->set(($this->prefix ? $this->prefix . '.' : '') . $message, $message); |
|
| 89 | + $catalogue->set(($this->prefix ? $this->prefix.'.' : '').$message, $message); |
|
| 90 | 90 | } |
| 91 | 91 | } |
| 92 | 92 | } |
@@ -50,6 +50,9 @@ |
||
| 50 | 50 | |
| 51 | 51 | /** |
| 52 | 52 | * {@inheritdoc} |
| 53 | + * @param string $format |
|
| 54 | + * @param string $resource |
|
| 55 | + * @param string $locale |
|
| 53 | 56 | */ |
| 54 | 57 | public function addResource($format, $resource, $locale, $domain = 'messages') |
| 55 | 58 | { |