Completed
Push — develop ( 4129fc...e8493f )
by Vagner Luz do
13:47
created
src/LanguageDetector.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     }
89 89
 
90 90
     /**
91
-     * @param $locale
91
+     * @param string $locale
92 92
      */
93 93
     public function addCookieToQueue($locale)
94 94
     {
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
     /**
155 155
      * Call all registered callbacks.
156 156
      *
157
-     * @param $language
157
+     * @param string $language
158 158
      */
159 159
     protected function applyCallbacks($language)
160 160
     {
Please login to merge, or discard this patch.
src/Drivers/UriDetectorDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
 
65 65
             return array_filter(
66 66
                 $aliases,
67
-                function ($item) use ($segment) {
67
+                function($item) use ($segment) {
68 68
                     return $segment == $item;
69 69
                 }
70 70
             );
Please login to merge, or discard this patch.
src/Providers/LanguageDetectorServiceProvider.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -69,8 +69,8 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function register()
71 71
     {
72
-        $this->app->resolving('Illuminate\Cookie\Middleware\EncryptCookies', function ($middleware) {
73
-            if ($this->config('cookie', true) && ! $this->config('cookie_encrypt', false)) {
72
+        $this->app->resolving('Illuminate\Cookie\Middleware\EncryptCookies', function($middleware) {
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
         });
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
         foreach ($this->drivers as $short => $driver) {
120 120
             $this->app->singleton(
121 121
                 'language.driver.'.$short,
122
-                function () use ($driver, $languages, $segment) {
122
+                function() use ($driver, $languages, $segment) {
123 123
                     /** @var AbstractDetector $instance */
124 124
                     $instance = new $driver($this->request, $languages);
125 125
                     $instance->setDefaultSegment($segment);
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 
157 157
         $this->app->singleton(
158 158
             $contract,
159
-            function () use ($driver, $cookie) {
159
+            function() use ($driver, $cookie) {
160 160
                 $detector = new LanguageDetector(
161 161
                     $this->translator,
162 162
                     $this->app['language.driver.'.$driver]
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
                 }
168 168
 
169 169
                 if (method_exists($this->app, 'setLocale')) {
170
-                    $detector->addCallback(function ($locale) {
170
+                    $detector->addCallback(function($locale) {
171 171
                         $this->app->setLocale($locale);
172 172
                     });
173 173
                 }
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
     {
209 209
         $this->app->bind(
210 210
             'language.routePrefix',
211
-            function () {
211
+            function() {
212 212
                 return $this->getLanguageDetector()->routePrefix();
213 213
             }
214 214
         );
Please login to merge, or discard this patch.
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.