@@ -11,24 +11,24 @@ discard block |
||
11 | 11 | { |
12 | 12 | app()->singleton( |
13 | 13 | 'translation.loader', |
14 | - function ($application) { |
|
15 | - return new Loader($application['files'], $application['path.lang']); |
|
14 | + function($application) { |
|
15 | + return new Loader($application[ 'files' ], $application[ 'path.lang' ]); |
|
16 | 16 | } |
17 | 17 | ); |
18 | 18 | |
19 | 19 | app()->singleton( |
20 | 20 | 'translator', |
21 | - function ($application) { |
|
21 | + function($application) { |
|
22 | 22 | $loader = $application->make('translation.loader'); |
23 | 23 | |
24 | 24 | // When registering the translator component, we'll need to set the default |
25 | 25 | // locale as well as the fallback locale. So, we'll grab the application |
26 | 26 | // configuration so we can easily get both of these values from there. |
27 | - $locale = $application['config']['app.locale']; |
|
27 | + $locale = $application[ 'config' ][ 'app.locale' ]; |
|
28 | 28 | |
29 | 29 | $trans = new Translator($loader, $locale); |
30 | 30 | |
31 | - $trans->setFallback($application['config']['app.fallback_locale']); |
|
31 | + $trans->setFallback($application[ 'config' ][ 'app.fallback_locale' ]); |
|
32 | 32 | |
33 | 33 | return $trans; |
34 | 34 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | config()->set('app.locale', LOCALE); |
40 | 40 | } |
41 | 41 | // Set our locale namespace. |
42 | - app()->make('translator')->addNamespace('streams', realpath(__DIR__ . '/../../vendor/visiosoft/streams-platform/resources/lang')); |
|
42 | + app()->make('translator')->addNamespace('streams', realpath(__DIR__.'/../../vendor/visiosoft/streams-platform/resources/lang')); |
|
43 | 43 | |
44 | 44 | } |
45 | 45 | } |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * |
22 | 22 | * @var array |
23 | 23 | */ |
24 | - protected static $disabled = []; |
|
24 | + protected static $disabled = [ ]; |
|
25 | 25 | |
26 | 26 | /** |
27 | 27 | * The streams path. |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | foreach (config()->get('override_text') as $override) { |
185 | 185 | $override = explode(':', $override); |
186 | 186 | |
187 | - $lines = $this->findArrayValue($override[0], $override[1], $lines); |
|
187 | + $lines = $this->findArrayValue($override[ 0 ], $override[ 1 ], $lines); |
|
188 | 188 | } |
189 | 189 | } |
190 | 190 | |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | { |
196 | 196 | if (is_array($arr)) { |
197 | 197 | foreach ($arr as $key => $item) { |
198 | - $arr[$key] = $this->replaceNewValue($find_value, $new_value, $item); |
|
198 | + $arr[ $key ] = $this->replaceNewValue($find_value, $new_value, $item); |
|
199 | 199 | } |
200 | 200 | return $arr; |
201 | 201 | } |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | function findArrayValue($find_value, $new_value, $arr) |
209 | 209 | { |
210 | 210 | foreach ($arr as $key => $item) { |
211 | - $arr[$key] = $this->replaceNewValue($find_value, $new_value, $item); |
|
211 | + $arr[ $key ] = $this->replaceNewValue($find_value, $new_value, $item); |
|
212 | 212 | } |
213 | 213 | return $arr; |
214 | 214 | } |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | $disabled = array_get(self::$disabled, $key = $addon->getNamespace('streams'), false); |
230 | 230 | |
231 | 231 | if (!$disabled && !$this->files->isDirectory($addon->getPath('resources/streams'))) { |
232 | - self::$disabled[$key] = $disabled = true; |
|
232 | + self::$disabled[ $key ] = $disabled = true; |
|
233 | 233 | } |
234 | 234 | |
235 | 235 | if (!$disabled && (!$namespace || $namespace == 'streams')) { |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | $disabled = array_get(self::$disabled, $key = $addon->getNamespace('addons'), false); |
245 | 245 | |
246 | 246 | if (!$disabled && !$this->files->isDirectory($addon->getPath('resources/addons'))) { |
247 | - self::$disabled[$key] = $disabled = true; |
|
247 | + self::$disabled[ $key ] = $disabled = true; |
|
248 | 248 | } |
249 | 249 | |
250 | 250 | if (!$disabled && str_is('*.*.*', $namespace)) { |