Completed
Push — master ( 34409f...d4483c )
by Philipp
07:56 queued 05:48
created
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
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         //fallback language is the same as the current language
96 96
         if (Config::beautify() && $this->current() === Config::fallbackLocale()) {
97 97
             //didn't found locale means browser is set to exmaple.com
98
-            if (! $locale) {
98
+            if (!$locale) {
99 99
                 return false;
100 100
             }
101 101
             //browser is set to en.example.com but should be forced back to example.com
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      */
118 118
     public function speaks(string $locale)
119 119
     {
120
-        if (! $this->isSpeaking($locale)) {
120
+        if (!$this->isSpeaking($locale)) {
121 121
             return abort(404); //oder error?
122 122
         }
123 123
 
@@ -159,11 +159,11 @@  discard block
 block discarded – undo
159 159
     {
160 160
         $locales = Config::supportedLocales();
161 161
 
162
-        if (empty($locales) || ! is_array($locales)) {
162
+        if (empty($locales) || !is_array($locales)) {
163 163
             throw new SupportedLocalesNotDefined();
164 164
         }
165 165
 
166
-        if (! $key) {
166
+        if (!$key) {
167 167
             return collect($locales);
168 168
         }
169 169
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
             return $this->BCP47($locale, $locales);
172 172
         }
173 173
 
174
-        if (! Arr::has($locales, "{$locale}.{$key}")) {
174
+        if (!Arr::has($locales, "{$locale}.{$key}")) {
175 175
             throw new SupportedLocalesNotDefined();
176 176
         }
177 177
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
     {
212 212
         $bcp47 = data_get($locales, "{$locale}.regional");
213 213
 
214
-        if (! $bcp47) {
214
+        if (!$bcp47) {
215 215
             return $locale;
216 216
         } //locale is the "minimum" of BCP 47
217 217
 
Please login to merge, or discard this patch.
src/Localization/Localization.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
     {
21 21
         $locale = self::fromUrl();
22 22
 
23
-        if (! $locale || ! tongue()->isSpeaking($locale)) {
24
-            if (! Config::beautify()) {
23
+        if (!$locale || !tongue()->isSpeaking($locale)) {
24
+            if (!Config::beautify()) {
25 25
                 return Config::fallbackLocale(); //redirects see test it_ignoes_cookies_and_redirects....
26 26
             }
27 27
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      */
87 87
     protected static function languageIsSet()
88 88
     {
89
-        return ! app()->runningInConsole() || Arr::has(request()->server(), 'HTTP_ACCEPT_LANGUAGE');
89
+        return !app()->runningInConsole() || Arr::has(request()->server(), 'HTTP_ACCEPT_LANGUAGE');
90 90
     }
91 91
 
92 92
     /**
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             return cookie()->queue(cookie()->forever(self::COOKIE, $locale));
104 104
         }
105 105
 
106
-        if (! request()->hasCookie(self::COOKIE)) {
106
+        if (!request()->hasCookie(self::COOKIE)) {
107 107
             return;
108 108
         }
109 109
 
Please login to merge, or discard this patch.