@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | ) { |
54 | 54 | $this->app = $app; |
55 | 55 | $this->config = $config; |
56 | - $this->translator = $this->config['translator']; |
|
56 | + $this->translator = $this->config[ 'translator' ]; |
|
57 | 57 | $this->localeSetter($locale); |
58 | 58 | $this->loadTranslations(); |
59 | 59 | } |
@@ -70,22 +70,21 @@ discard block |
||
70 | 70 | { |
71 | 71 | $this->app->bind( |
72 | 72 | $this->translator, |
73 | - function ($app) { |
|
73 | + function($app) { |
|
74 | 74 | $trans = new Translator( |
75 | 75 | $this->loader(), |
76 | 76 | (string) ($this->locale !== null ? |
77 | - $this->locale : |
|
78 | - $this->locale( |
|
77 | + $this->locale : $this->locale( |
|
79 | 78 | $app |
80 | 79 | )) |
81 | 80 | ); |
82 | 81 | $this->locale !== null ? $this->locale : $trans->setFallback( |
83 | - $app['config']['app.fallback_locale'] |
|
82 | + $app[ 'config' ][ 'app.fallback_locale' ] |
|
84 | 83 | ); |
85 | 84 | $trans->addNamespace( |
86 | - $this->config['nameSpace'], |
|
85 | + $this->config[ 'nameSpace' ], |
|
87 | 86 | __DIR__. |
88 | - $this->config['loadLangPath'] |
|
87 | + $this->config[ 'loadLangPath' ] |
|
89 | 88 | ); |
90 | 89 | |
91 | 90 | return $trans; |
@@ -145,7 +144,7 @@ discard block |
||
145 | 144 | private function loader(): FileLoader |
146 | 145 | { |
147 | 146 | $filesystem = new Filesystem(); |
148 | - $resourcesLangPath = $this->config['packageRootPath'].$this->config['loaderLangPath']; |
|
147 | + $resourcesLangPath = $this->config[ 'packageRootPath' ].$this->config[ 'loaderLangPath' ]; |
|
149 | 148 | $filesystem->allFiles($resourcesLangPath); |
150 | 149 | |
151 | 150 | return new FileLoader($filesystem, $resourcesLangPath); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | // Register the service the package provides. |
37 | 37 | $this->app->singleton( |
38 | 38 | 'package-translator-loader', |
39 | - function ($app) { |
|
39 | + function($app) { |
|
40 | 40 | return new PackageTranslatorLoader($app); |
41 | 41 | } |
42 | 42 | ); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function provides(): array |
51 | 51 | { |
52 | - return ['package-translator-loader']; |
|
52 | + return [ 'package-translator-loader' ]; |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | /** |