@@ -27,10 +27,10 @@ discard block |
||
| 27 | 27 | * |
| 28 | 28 | * @return void |
| 29 | 29 | */ |
| 30 | - public function register() |
|
| 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 | /** |
@@ -49,36 +49,36 @@ discard block |
||
| 49 | 49 | * |
| 50 | 50 | * @return void |
| 51 | 51 | */ |
| 52 | - public function boot(LocalisationRegistrar $localisationLoader, Filesystem $filesystem) |
|
| 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 | // dd(app()->getLocale()); |
| 95 | 95 | // echo '<pre>'; |
| 96 | 96 | // print_r($this->app['translator']); |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | |
| 107 | 107 | $this->app->singleton( |
| 108 | 108 | LocalisationRegistrar::class, |
| 109 | - function ($app) use ($localisationLoader) { |
|
| 109 | + function($app) use ($localisationLoader) { |
|
| 110 | 110 | return $localisationLoader; |
| 111 | 111 | } |
| 112 | 112 | ); |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | * |
| 121 | 121 | * @return void |
| 122 | 122 | */ |
| 123 | - protected function registerModelBindings() |
|
| 123 | + protected function registerModelBindings () |
|
| 124 | 124 | { |
| 125 | 125 | $config = $this->app->config['pwweb.localisation.models']; |
| 126 | 126 | |
@@ -136,16 +136,16 @@ discard block |
||
| 136 | 136 | * |
| 137 | 137 | * @return string migration filename |
| 138 | 138 | */ |
| 139 | - protected function getMigrationFileName(Filesystem $filesystem): string |
|
| 139 | + protected function getMigrationFileName (Filesystem $filesystem): string |
|
| 140 | 140 | { |
| 141 | 141 | $timestamp = date('Y_m_d_His', mktime(0, 0, 0, 1, 1, 2020)); |
| 142 | 142 | |
| 143 | - return Collection::make($this->app->databasePath() . DIRECTORY_SEPARATOR . 'migrations' . DIRECTORY_SEPARATOR) |
|
| 143 | + return Collection::make($this->app->databasePath().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR) |
|
| 144 | 144 | ->flatMap( |
| 145 | - function ($path) use ($filesystem) { |
|
| 146 | - return $filesystem->glob($path . '*_create_localisation_tables.php'); |
|
| 145 | + function($path) use ($filesystem) { |
|
| 146 | + return $filesystem->glob($path.'*_create_localisation_tables.php'); |
|
| 147 | 147 | } |
| 148 | - )->push($this->app->databasePath() . "/migrations/{$timestamp}_create_localisation_tables.php") |
|
| 148 | + )->push($this->app->databasePath()."/migrations/{$timestamp}_create_localisation_tables.php") |
|
| 149 | 149 | ->first(); |
| 150 | 150 | } |
| 151 | 151 | } |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | * |
| 74 | 74 | * @param array $attributes additional attributes for model initialisation |
| 75 | 75 | */ |
| 76 | - public function __construct(array $attributes = []) |
|
| 76 | + public function __construct (array $attributes = []) |
|
| 77 | 77 | { |
| 78 | 78 | parent::__construct($attributes); |
| 79 | 79 | |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | * |
| 86 | 86 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
| 87 | 87 | **/ |
| 88 | - public function addresses() |
|
| 88 | + public function addresses () |
|
| 89 | 89 | { |
| 90 | 90 | return $this->hasMany(\PWWEB\Localisation\Models\Address::class, 'type_id'); |
| 91 | 91 | } |
@@ -97,12 +97,12 @@ discard block |
||
| 97 | 97 | * |
| 98 | 98 | * @return string |
| 99 | 99 | */ |
| 100 | - public function getNameAttribute($value) |
|
| 100 | + public function getNameAttribute ($value) |
|
| 101 | 101 | { |
| 102 | 102 | if (null === $value || '' === $value) { |
| 103 | 103 | return ''; |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - return __('pwweb::localisation.' . $value); |
|
| 106 | + return __('pwweb::localisation.'.$value); |
|
| 107 | 107 | } |
| 108 | 108 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | private $typeRepository; |
| 32 | 32 | |
| 33 | - public function __construct(TypeRepository $typeRepo) |
|
| 33 | + public function __construct (TypeRepository $typeRepo) |
|
| 34 | 34 | { |
| 35 | 35 | $this->typeRepository = $typeRepo; |
| 36 | 36 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * |
| 43 | 43 | * @return \Illuminate\View\View |
| 44 | 44 | */ |
| 45 | - public function index(Request $request) : View |
|
| 45 | + public function index (Request $request) : View |
|
| 46 | 46 | { |
| 47 | 47 | $types = $this->typeRepository->all(); |
| 48 | 48 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | * |
| 56 | 56 | * @return \Illuminate\View\View |
| 57 | 57 | */ |
| 58 | - public function create() : View |
|
| 58 | + public function create () : View |
|
| 59 | 59 | { |
| 60 | 60 | return view('localisation::address.type.create'); |
| 61 | 61 | } |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | * |
| 68 | 68 | * @return \Illuminate\Http\RedirectResponse |
| 69 | 69 | */ |
| 70 | - public function store(CreateTypeRequest $request) : RedirectResponse |
|
| 70 | + public function store (CreateTypeRequest $request) : RedirectResponse |
|
| 71 | 71 | { |
| 72 | 72 | $input = $request->all(); |
| 73 | 73 | |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | * |
| 86 | 86 | * @return \Illuminate\View\View |
| 87 | 87 | */ |
| 88 | - public function show($id) : View |
|
| 88 | + public function show ($id) : View |
|
| 89 | 89 | { |
| 90 | 90 | $type = $this->typeRepository->find($id); |
| 91 | 91 | |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | * |
| 106 | 106 | * @return \Illuminate\View\View |
| 107 | 107 | */ |
| 108 | - public function edit($id) : View |
|
| 108 | + public function edit ($id) : View |
|
| 109 | 109 | { |
| 110 | 110 | $type = $this->typeRepository->find($id); |
| 111 | 111 | |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | * |
| 127 | 127 | * @return \Illuminate\Http\RedirectResponse |
| 128 | 128 | */ |
| 129 | - public function update(UpdateTypeRequest $request, $id) : RedirectResponse |
|
| 129 | + public function update (UpdateTypeRequest $request, $id) : RedirectResponse |
|
| 130 | 130 | { |
| 131 | 131 | $type = $this->typeRepository->find($id); |
| 132 | 132 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | * |
| 153 | 153 | * @return \Illuminate\Http\RedirectResponse |
| 154 | 154 | */ |
| 155 | - public function destroy($id) : RedirectResponse |
|
| 155 | + public function destroy ($id) : RedirectResponse |
|
| 156 | 156 | { |
| 157 | 157 | $type = $this->typeRepository->find($id); |
| 158 | 158 | |