@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | */ |
98 | 98 | public static function domain($domain, $code = null) |
99 | 99 | { |
100 | - return function ($text, array $tokens = null) use ($domain, $code) { |
|
100 | + return function($text, array $tokens = null) use ($domain, $code) { |
|
101 | 101 | return self::translate($code ?: self::$code, $domain, $text, $tokens); |
102 | 102 | }; |
103 | 103 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | { |
117 | 117 | $name = "{$domain}/{$code}"; |
118 | 118 | |
119 | - if (! isset(self::$lang[$name])) { |
|
119 | + if (!isset(self::$lang[$name])) { |
|
120 | 120 | self::load($name); |
121 | 121 | } |
122 | 122 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $template, |
155 | 155 | array_combine( |
156 | 156 | array_map( |
157 | - function ($key) { |
|
157 | + function($key) { |
|
158 | 158 | return "{{$key}}"; |
159 | 159 | }, |
160 | 160 | array_keys($tokens) |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | array_pop($domain_names); |
208 | 208 | } |
209 | 209 | |
210 | - if (! isset(self::$lang[$name])) { |
|
210 | + if (!isset(self::$lang[$name])) { |
|
211 | 211 | self::$lang[$name] = []; // no translation file available |
212 | 212 | |
213 | 213 | if (self::$on_error) { |
@@ -94,7 +94,7 @@ |
||
94 | 94 | * @param string $domain translation domain name |
95 | 95 | * @param string|null $code optional language code (defaults to the current language) |
96 | 96 | * |
97 | - * @return callable function ($text, array $tokens) : string |
|
97 | + * @return \Closure function ($text, array $tokens) : string |
|
98 | 98 | */ |
99 | 99 | public static function domain($domain, $code = null) |
100 | 100 | { |