| @@ -64,7 +64,7 @@ discard block | ||
| 64 | 64 | $addresses = collect($addresses) | 
| 65 | 65 | ->flatten() | 
| 66 | 66 | ->map( | 
| 67 | -                function ($address) { | |
| 67 | +                function($address) { | |
| 68 | 68 |                      if (true === empty($address)) { | 
| 69 | 69 | return false; | 
| 70 | 70 | } | 
| @@ -73,7 +73,7 @@ discard block | ||
| 73 | 73 | } | 
| 74 | 74 | ) | 
| 75 | 75 | ->filter( | 
| 76 | -                function ($address) { | |
| 76 | +                function($address) { | |
| 77 | 77 | return $address instanceof Address; | 
| 78 | 78 | } | 
| 79 | 79 | ) | 
| @@ -89,7 +89,7 @@ discard block | ||
| 89 | 89 | $class = \get_class($model); | 
| 90 | 90 | |
| 91 | 91 | $class::saved( | 
| 92 | -                function ($object) use ($addresses, $model) { | |
| 92 | +                function($object) use ($addresses, $model) { | |
| 93 | 93 | static $modelLastFiredOn; | 
| 94 | 94 |                      if (null !== $modelLastFiredOn && $modelLastFiredOn === $model) { | 
| 95 | 95 | return; | 
| @@ -84,7 +84,7 @@ | ||
| 84 | 84 |          } else if ($locale === $fallbackLocale) { | 
| 85 | 85 | $locale = 'en-GB'; | 
| 86 | 86 |          } else { | 
| 87 | - $locale = $fallbackLocale . '-' . strtoupper($fallbackLocale); | |
| 87 | + $locale = $fallbackLocale.'-'.strtoupper($fallbackLocale); | |
| 88 | 88 | } | 
| 89 | 89 | |
| 90 | 90 |          try { | 
| @@ -60,6 +60,6 @@ | ||
| 60 | 60 | return ''; | 
| 61 | 61 | } | 
| 62 | 62 | |
| 63 | -        return __('pwweb::localization.' . $value); | |
| 63 | +        return __('pwweb::localization.'.$value); | |
| 64 | 64 | } | 
| 65 | 65 | } | 
| @@ -103,6 +103,6 @@ | ||
| 103 | 103 | return ''; | 
| 104 | 104 | } | 
| 105 | 105 | |
| 106 | -        return __('pwweb::localisation.' . $value); | |
| 106 | +        return __('pwweb::localisation.'.$value); | |
| 107 | 107 | } | 
| 108 | 108 | } | 
| @@ -226,7 +226,7 @@ discard block | ||
| 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(); | 
| @@ -257,7 +257,7 @@ discard block | ||
| 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(); | 
| @@ -30,7 +30,7 @@ discard block | ||
| 30 | 30 | public function register() | 
| 31 | 31 |      { | 
| 32 | 32 | $this->mergeConfigFrom( | 
| 33 | - __DIR__ . '/../config/localisation.php', | |
| 33 | + __DIR__.'/../config/localisation.php', | |
| 34 | 34 | 'pwweb.localisation' | 
| 35 | 35 | ); | 
| 36 | 36 | |
| @@ -38,7 +38,7 @@ discard block | ||
| 38 | 38 |          $this->app->make('PWWEB\Localisation\Controllers\IndexController'); | 
| 39 | 39 | |
| 40 | 40 | // Register views. | 
| 41 | - $this->loadViewsFrom(__DIR__ . '/resources/views', 'localisation'); | |
| 41 | + $this->loadViewsFrom(__DIR__.'/resources/views', 'localisation'); | |
| 42 | 42 | } | 
| 43 | 43 | |
| 44 | 44 | /** | 
| @@ -51,34 +51,34 @@ discard block | ||
| 51 | 51 | */ | 
| 52 | 52 | public function boot(LocalisationRegistrar $localisationLoader, Filesystem $filesystem) | 
| 53 | 53 |      { | 
| 54 | - include __DIR__ . '/../routes/web.php'; | |
| 54 | + include __DIR__.'/../routes/web.php'; | |
| 55 | 55 | |
| 56 | 56 |          if (true === function_exists('config_path')) { | 
| 57 | 57 | // function not available and 'publish' not relevant in Lumen | 
| 58 | 58 | $this->publishes( | 
| 59 | 59 | [ | 
| 60 | -                    __DIR__ . '/../config/localisation.php' => config_path('pwweb/localisation.php'), | |
| 60 | +                    __DIR__.'/../config/localisation.php' => config_path('pwweb/localisation.php'), | |
| 61 | 61 | ], | 
| 62 | 62 | 'pwweb.localisation.config' | 
| 63 | 63 | ); | 
| 64 | 64 | |
| 65 | 65 | $this->publishes( | 
| 66 | 66 | [ | 
| 67 | - __DIR__ . '/../database/migrations/create_localisation_tables.php.stub' => $this->getMigrationFileName($filesystem), | |
| 67 | + __DIR__.'/../database/migrations/create_localisation_tables.php.stub' => $this->getMigrationFileName($filesystem), | |
| 68 | 68 | ], | 
| 69 | 69 | 'pwweb.localisation.migrations' | 
| 70 | 70 | ); | 
| 71 | 71 | |
| 72 | 72 | $this->publishes( | 
| 73 | 73 | [ | 
| 74 | -                    __DIR__ . '/resources/lang' => resource_path('lang/vendor/pwweb'), | |
| 74 | +                    __DIR__.'/resources/lang' => resource_path('lang/vendor/pwweb'), | |
| 75 | 75 | ], | 
| 76 | 76 | 'pwweb.localisation.language' | 
| 77 | 77 | ); | 
| 78 | 78 | |
| 79 | 79 | $this->publishes( | 
| 80 | 80 | [ | 
| 81 | -                    __DIR__ . '/resources/views' => base_path('resources/views/vendor/localisation'), | |
| 81 | +                    __DIR__.'/resources/views' => base_path('resources/views/vendor/localisation'), | |
| 82 | 82 | ], | 
| 83 | 83 | 'pwweb.localisation.views' | 
| 84 | 84 | ); | 
| @@ -90,7 +90,7 @@ discard block | ||
| 90 | 90 | ] | 
| 91 | 91 | ); | 
| 92 | 92 | |
| 93 | - $this->loadTranslationsFrom(realpath(__DIR__ . '/resources/lang'), 'pwweb'); | |
| 93 | + $this->loadTranslationsFrom(realpath(__DIR__.'/resources/lang'), 'pwweb'); | |
| 94 | 94 | |
| 95 | 95 | $this->registerModelBindings(); | 
| 96 | 96 | |
| @@ -103,7 +103,7 @@ discard block | ||
| 103 | 103 | |
| 104 | 104 | $this->app->singleton( | 
| 105 | 105 | LocalisationRegistrar::class, | 
| 106 | -            function ($app) use ($localisationLoader) { | |
| 106 | +            function($app) use ($localisationLoader) { | |
| 107 | 107 | return $localisationLoader; | 
| 108 | 108 | } | 
| 109 | 109 | ); | 
| @@ -137,12 +137,12 @@ discard block | ||
| 137 | 137 |      { | 
| 138 | 138 |          $timestamp = date('Y_m_d_His', mktime(0, 0, 0, 1, 1, 2020)); | 
| 139 | 139 | |
| 140 | - return Collection::make($this->app->databasePath() . DIRECTORY_SEPARATOR . 'migrations' . DIRECTORY_SEPARATOR) | |
| 140 | + return Collection::make($this->app->databasePath().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR) | |
| 141 | 141 | ->flatMap( | 
| 142 | -                function ($path) use ($filesystem) { | |
| 143 | - return $filesystem->glob($path . '*_create_localisation_tables.php'); | |
| 142 | +                function($path) use ($filesystem) { | |
| 143 | + return $filesystem->glob($path.'*_create_localisation_tables.php'); | |
| 144 | 144 | } | 
| 145 | -            )->push($this->app->databasePath() . "/migrations/{$timestamp}_create_localisation_tables.php") | |
| 145 | +            )->push($this->app->databasePath()."/migrations/{$timestamp}_create_localisation_tables.php") | |
| 146 | 146 | ->first(); | 
| 147 | 147 | } | 
| 148 | 148 | } |