@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! function_exists('parse_langs_to_array')) { |
|
3 | +if (!function_exists('parse_langs_to_array')) { |
|
4 | 4 | /** |
5 | 5 | * Parse a simple string comma-separated to array. |
6 | 6 | * @see split_srt_to_simple_array. |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | if (is_numeric($alias) && str_contains($lang, '-')) { |
21 | 21 | $newAlias = preg_replace('/-/', '_', $lang); |
22 | 22 | |
23 | - if (! isset($languages[$newAlias])) { |
|
23 | + if (!isset($languages[$newAlias])) { |
|
24 | 24 | $languages[$newAlias] = $lang; |
25 | 25 | } |
26 | 26 | } |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | } |
31 | 31 | } |
32 | 32 | |
33 | -if (! function_exists('split_str_to_simple_array')) { |
|
33 | +if (!function_exists('split_str_to_simple_array')) { |
|
34 | 34 | /** |
35 | 35 | * Parse a simple string comma-separated to array. It also allow to use simple |
36 | 36 | * indexes, like: "something:awesome, locale:pt-br, country:brazil". |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | public function register() |
71 | 71 | { |
72 | 72 | $this->app->resolving('Illuminate\Cookie\Middleware\EncryptCookies', function ($middleware) { |
73 | - if ($this->config('cookie', true) && ! $this->config('cookie_encrypt', false)) { |
|
73 | + if ($this->config('cookie', true) && !$this->config('cookie_encrypt', false)) { |
|
74 | 74 | $middleware->disableFor($this->config('lang-detector.cookie_name', 'locale')); |
75 | 75 | } |
76 | 76 | }); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | protected function registerAndPublishConfigurations() |
100 | 100 | { |
101 | - $configFile = __DIR__.'/../../config/lang-detector.php'; |
|
101 | + $configFile = __DIR__ . '/../../config/lang-detector.php'; |
|
102 | 102 | |
103 | 103 | $this->publishes([$configFile => base_path('config/lang-detector.php')]); |
104 | 104 | |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | |
119 | 119 | foreach ($this->drivers as $short => $driver) { |
120 | 120 | $this->app->singleton( |
121 | - 'language.driver.'.$short, |
|
121 | + 'language.driver.' . $short, |
|
122 | 122 | function () use ($driver, $languages, $segment) { |
123 | 123 | /** @var AbstractDetector $instance */ |
124 | 124 | $instance = new $driver($this->request, $languages); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | protected function config($key, $default = null) |
140 | 140 | { |
141 | - return $this->config->get('lang-detector.'.$key, $default); |
|
141 | + return $this->config->get('lang-detector.' . $key, $default); |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | /** |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | function () use ($driver, $cookie) { |
160 | 160 | $detector = new LanguageDetector( |
161 | 161 | $this->translator, |
162 | - $this->app['language.driver.'.$driver] |
|
162 | + $this->app['language.driver.' . $driver] |
|
163 | 163 | ); |
164 | 164 | |
165 | 165 | if ($cookie) { |