@@ -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) { |
@@ -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. |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | if (is_numeric($alias) && preg_match('/(-|_)/', $langLocale)) { |
24 | 24 | list($lang, $locale) = preg_split('/(-|_)/', $langLocale); |
25 | 25 | |
26 | - $newAlias = strtolower($lang).'_'.strtoupper($locale); |
|
26 | + $newAlias = strtolower($lang) . '_' . strtoupper($locale); |
|
27 | 27 | |
28 | - if (! isset($languages[$newAlias])) { |
|
28 | + if (!isset($languages[$newAlias])) { |
|
29 | 29 | $languages[$newAlias] = $langLocale; |
30 | 30 | } |
31 | 31 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | } |
36 | 36 | } |
37 | 37 | |
38 | -if (! function_exists('split_str_to_simple_array')) { |
|
38 | +if (!function_exists('split_str_to_simple_array')) { |
|
39 | 39 | /** |
40 | 40 | * Parse a simple string comma-separated to array. It also allow to use simple |
41 | 41 | * indexes, like: "something:awesome, locale:pt-br, country:brazil". |