Completed
Push — master ( 4129fc...c405c7 )
by Vagner Luz do
05:29 queued 02:07
created
Category
src/Support/helpers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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".
Please login to merge, or discard this patch.
src/Providers/LanguageDetectorServiceProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.