Completed
Pull Request — master (#19)
by Philipp
08:25 queued 06:07
created
src/Localization/Localization.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
             // this could be a future bug
27 27
             // when no middleware is active the language is not set right
28 28
             // domain.com could be in german etc...
29
-            if (! Config::beautify()) {
29
+            if (!Config::beautify()) {
30 30
                 // if the middleware is active we should be redirected to en.domain.com
31 31
                 // if not the fallback language is going to be used
32 32
                 return Config::fallbackLocale();
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         }
37 37
 
38 38
         // could be a custom subdomain
39
-        if (! tongue()->isSpeaking($locale)) {
39
+        if (!tongue()->isSpeaking($locale)) {
40 40
             // check if it is a white listed domain
41 41
             if (tongue()->speaking('subdomains', $locale)) {
42 42
                 return self::currentTongue();
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      */
104 104
     protected static function languageIsSet()
105 105
     {
106
-        return ! app()->runningInConsole() || Arr::has(request()->server(), 'HTTP_ACCEPT_LANGUAGE');
106
+        return !app()->runningInConsole() || Arr::has(request()->server(), 'HTTP_ACCEPT_LANGUAGE');
107 107
     }
108 108
 
109 109
     /**
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             return cookie()->queue(cookie()->forever(self::COOKIE, $locale));
121 121
         }
122 122
 
123
-        if (! request()->hasCookie(self::COOKIE)) {
123
+        if (!request()->hasCookie(self::COOKIE)) {
124 124
             return;
125 125
         }
126 126
 
Please login to merge, or discard this patch.
src/Tongue.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     {
48 48
         $locale = $this->app->getLocale();
49 49
 
50
-        if (! $key) {
50
+        if (!$key) {
51 51
             return $locale;
52 52
         }
53 53
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         //fallback language is the same as the current language
102 102
         if (Config::beautify() && $this->current() === Config::fallbackLocale()) {
103 103
             //didn't found locale means browser is set to exmaple.com
104
-            if (! $locale) {
104
+            if (!$locale) {
105 105
                 return false;
106 106
             }
107 107
             //browser is set to en.example.com but should be forced back to example.com
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      */
124 124
     public function speaks(string $locale)
125 125
     {
126
-        if (! $this->isSpeaking($locale)) {
126
+        if (!$this->isSpeaking($locale)) {
127 127
             return abort(404); //oder error?
128 128
         }
129 129
 
@@ -165,11 +165,11 @@  discard block
 block discarded – undo
165 165
     {
166 166
         $locales = Config::supportedLocales();
167 167
 
168
-        if (empty($locales) || ! is_array($locales)) {
168
+        if (empty($locales) || !is_array($locales)) {
169 169
             throw new SupportedLocalesNotDefined();
170 170
         }
171 171
 
172
-        if (! $key) {
172
+        if (!$key) {
173 173
             return collect($locales);
174 174
         }
175 175
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
             return $this->getAliases($locale);
186 186
         }
187 187
 
188
-        if (! Arr::has($locales, "{$locale}.{$key}")) {
188
+        if (!Arr::has($locales, "{$locale}.{$key}")) {
189 189
             throw new SupportedLocalesNotDefined();
190 190
         }
191 191
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
     {
226 226
         $bcp47 = data_get($locales, "{$locale}.regional");
227 227
 
228
-        if (! $bcp47) {
228
+        if (!$bcp47) {
229 229
             return $locale;
230 230
         } //locale is the "minimum" of BCP 47
231 231
 
Please login to merge, or discard this patch.