Passed
Push — master ( 8fe73e...cbadeb )
by F
03:17
created
src/Localisation.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      *
47 47
      * @param \Illuminate\Foundation\Application $app laravel application for further use
48 48
      */
49
-    public function __construct($app = null)
49
+    public function __construct ($app = null)
50 50
     {
51 51
         if (null === $app) {
52 52
             $app = app();
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      *
64 64
      * @return \Illuminate\Database\Eloquent\Collection a collection of active languages
65 65
      */
66
-    public static function languages(): Collection
66
+    public static function languages (): Collection
67 67
     {
68 68
         return Language::where('active', 1)->get();
69 69
     }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      *
76 76
      * @return \PWWEB\Localisation\Contracts\Language A language object
77 77
      */
78
-    public static function currentLanguage(string $locale = ''): LanguageContract
78
+    public static function currentLanguage (string $locale = ''): LanguageContract
79 79
     {
80 80
         $fallbackLocale = config('app.fallback_locale');
81 81
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      *
102 102
      * @return \Illuminate\Contracts\Support\Renderable language selector / switcher markup
103 103
      */
104
-    public static function languageSelector(): Renderable
104
+    public static function languageSelector (): Renderable
105 105
     {
106 106
         $languages = self::languages();
107 107
         $current = self::currentLanguage();
Please login to merge, or discard this patch.
src/Models/Country.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      *
26 26
      * @return void
27 27
      */
28
-    public function __construct(array $attributes = [])
28
+    public function __construct (array $attributes = [])
29 29
     {
30 30
         parent::__construct($attributes);
31 31
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      *
38 38
      * @return \Illuminate\Database\Eloquent\Relations\HasMany collection of languages used in the country
39 39
      */
40
-    public function languages(): HasMany
40
+    public function languages (): HasMany
41 41
     {
42 42
         return $this->hasMany(
43 43
             config('pwweb.localisation.models.languages'),
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      *
55 55
      * @return string|array Localised country name.
56 56
      */
57
-    public function getNameAttribute($value)
57
+    public function getNameAttribute ($value)
58 58
     {
59 59
         if (null === $value || '' === $value) {
60 60
             return '';
Please login to merge, or discard this patch.
src/Controllers/LanguageController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      *
16 16
      * @return \Illuminate\Http\RedirectResponse
17 17
      */
18
-    public function switch($locale)
18
+    public function switch ($locale)
19 19
     {
20 20
         $locales = (array) Language::getLocales();
21 21
 
Please login to merge, or discard this patch.
src/LocalisationRegistrar.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      *
118 118
      * @param \Illuminate\Cache\CacheManager $cacheManager The cache manager object
119 119
      */
120
-    public function __construct(CacheManager $cacheManager)
120
+    public function __construct (CacheManager $cacheManager)
121 121
     {
122 122
         $this->addressClass = config('pwweb.localisation.models.address');
123 123
         $this->addressTypeClass = config('pwweb.localisation.models.address_type');
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      *
135 135
      * @return void
136 136
      */
137
-    protected function initializeCache()
137
+    protected function initializeCache ()
138 138
     {
139 139
         self::$cacheExpirationTime = config('pwweb.localisation.cache.expiration_time', config('pwweb.localisation.cache_expiration_time'));
140 140
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      *
150 150
      * @return Repository Cache store
151 151
      */
152
-    protected function getCacheStoreFromConfig(): Repository
152
+    protected function getCacheStoreFromConfig (): Repository
153 153
     {
154 154
         // the 'default' fallback here is from the localisation.php config file, where 'default' means to use config(cache.default)
155 155
         $cacheDriver = config('pwweb.localisation.cache.store', 'default');
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
      *
173 173
      * @return bool
174 174
      */
175
-    public function registerLanguages(): bool
175
+    public function registerLanguages (): bool
176 176
     {
177 177
         return true;
178 178
     }
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
      *
183 183
      * @return bool
184 184
      */
185
-    public function forgetCachedAddresses()
185
+    public function forgetCachedAddresses ()
186 186
     {
187 187
         $this->addresses = null;
188 188
 
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
      *
195 195
      * @return bool
196 196
      */
197
-    public function forgetCachedLanguages()
197
+    public function forgetCachedLanguages ()
198 198
     {
199 199
         $this->languages = null;
200 200
 
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
      *
209 209
      * @return void
210 210
      */
211
-    public function clearClassLanguages()
211
+    public function clearClassLanguages ()
212 212
     {
213 213
         $this->languages = null;
214 214
     }
@@ -220,13 +220,13 @@  discard block
 block discarded – undo
220 220
      *
221 221
      * @return \Illuminate\Support\Collection
222 222
      */
223
-    public function getAddresses(array $params = []): Collection
223
+    public function getAddresses (array $params = []): Collection
224 224
     {
225 225
         if (null === $this->addresses) {
226 226
             $this->addresses = $this->cache->remember(
227 227
                 self::$cacheKey.'.addresses',
228 228
                 self::$cacheExpirationTime,
229
-                function () {
229
+                function() {
230 230
                     return $this->getAddressModel()
231 231
                         //->with('system_address_types')
232 232
                         ->get();
@@ -251,13 +251,13 @@  discard block
 block discarded – undo
251 251
      *
252 252
      * @return \Illuminate\Support\Collection
253 253
      */
254
-    public function getLanguages(array $params = []): Collection
254
+    public function getLanguages (array $params = []): Collection
255 255
     {
256 256
         if (null === $this->languages) {
257 257
             $this->languages = $this->cache->remember(
258 258
                 self::$cacheKey,
259 259
                 self::$cacheExpirationTime,
260
-                function () {
260
+                function() {
261 261
                     return $this->getLanguageClass()
262 262
                     //->with('countries')
263 263
                         ->get();
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
      *
280 280
      * @return PWWeb\Localisation\Contract\Address
281 281
      */
282
-    public function getAddressModel(): Address
282
+    public function getAddressModel (): Address
283 283
     {
284 284
         return app($this->addressClass);
285 285
     }
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
      *
290 290
      * @return PWWeb\Localisation\Contract\Address\Type
291 291
      */
292
-    public function getAddressTypeClass(): AddressType
292
+    public function getAddressTypeClass (): AddressType
293 293
     {
294 294
         return app($this->addressTypeClass);
295 295
     }
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
      *
300 300
      * @return PWWeb\Localisation\Contract\Country
301 301
      */
302
-    public function getCountryClass(): Country
302
+    public function getCountryClass (): Country
303 303
     {
304 304
         return app($this->countryClass);
305 305
     }
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
      *
310 310
      * @return PWWeb\Localisation\Contract\Currency
311 311
      */
312
-    public function getCurrencyClass(): Currency
312
+    public function getCurrencyClass (): Currency
313 313
     {
314 314
         return app($this->currencyClass);
315 315
     }
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
      *
320 320
      * @return PWWeb\Localisation\Contract\Language
321 321
      */
322
-    public function getLanguageClass(): Language
322
+    public function getLanguageClass (): Language
323 323
     {
324 324
         return app($this->languageClass);
325 325
     }
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
      *
332 332
      * @return object
333 333
      */
334
-    public function setAddressClass(string $addressClass)
334
+    public function setAddressClass (string $addressClass)
335 335
     {
336 336
         $this->addressClass = $addressClass;
337 337
 
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
      *
346 346
      * @return object
347 347
      */
348
-    public function setLanguageClass(string $languageClass)
348
+    public function setLanguageClass (string $languageClass)
349 349
     {
350 350
         $this->languageClass = $languageClass;
351 351
 
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
      *
358 358
      * @return \Illuminate\Contracts\Cache\Store
359 359
      */
360
-    public function getCacheStore(): \Illuminate\Contracts\Cache\Store
360
+    public function getCacheStore (): \Illuminate\Contracts\Cache\Store
361 361
     {
362 362
         return $this->cache->getStore();
363 363
     }
Please login to merge, or discard this patch.