@@ -27,7 +27,7 @@ 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 | 33 | __DIR__.'/../config/localisation.php', |
@@ -49,7 +49,7 @@ 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 | 54 | include __DIR__.'/../routes/web.php'; |
55 | 55 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | $this->app->singleton( |
104 | 104 | LocalisationRegistrar::class, |
105 | - function ($app) use ($localisationLoader) { |
|
105 | + function($app) use ($localisationLoader) { |
|
106 | 106 | return $localisationLoader; |
107 | 107 | } |
108 | 108 | ); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | * |
114 | 114 | * @return void |
115 | 115 | */ |
116 | - protected function registerModelBindings() |
|
116 | + protected function registerModelBindings () |
|
117 | 117 | { |
118 | 118 | $config = $this->app->config['pwweb.localisation.models']; |
119 | 119 | |
@@ -129,13 +129,13 @@ discard block |
||
129 | 129 | * |
130 | 130 | * @return string migration filename |
131 | 131 | */ |
132 | - protected function getMigrationFileName(Filesystem $filesystem): string |
|
132 | + protected function getMigrationFileName (Filesystem $filesystem): string |
|
133 | 133 | { |
134 | 134 | $timestamp = date('Y_m_d_His', mktime(0, 0, 0, 1, 1, 2020)); |
135 | 135 | |
136 | 136 | return Collection::make($this->app->databasePath().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR) |
137 | 137 | ->flatMap( |
138 | - function ($path) use ($filesystem) { |
|
138 | + function($path) use ($filesystem) { |
|
139 | 139 | return $filesystem->glob($path.'*_create_localisation_tables.php'); |
140 | 140 | } |
141 | 141 | )->push($this->app->databasePath()."/migrations/{$timestamp}_create_localisation_tables.php") |
@@ -46,7 +46,7 @@ discard block |
||
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 |
||
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 |
||
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 | |
@@ -84,7 +84,7 @@ discard block |
||
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 { |
@@ -101,7 +101,7 @@ discard block |
||
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(); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | /** @var TypeRepository */ |
28 | 28 | private $typeRepository; |
29 | 29 | |
30 | - public function __construct(TypeRepository $typeRepo) |
|
30 | + public function __construct (TypeRepository $typeRepo) |
|
31 | 31 | { |
32 | 32 | $this->typeRepository = $typeRepo; |
33 | 33 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | * |
40 | 40 | * @return Response |
41 | 41 | */ |
42 | - public function index(Request $request) |
|
42 | + public function index (Request $request) |
|
43 | 43 | { |
44 | 44 | $types = $this->typeRepository->all(); |
45 | 45 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | * |
53 | 53 | * @return Response |
54 | 54 | */ |
55 | - public function create() |
|
55 | + public function create () |
|
56 | 56 | { |
57 | 57 | return view('localisation::address.type.create'); |
58 | 58 | } |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | * |
65 | 65 | * @return Response |
66 | 66 | */ |
67 | - public function store(CreateTypeRequest $request) |
|
67 | + public function store (CreateTypeRequest $request) |
|
68 | 68 | { |
69 | 69 | $input = $request->all(); |
70 | 70 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | * |
83 | 83 | * @return Response |
84 | 84 | */ |
85 | - public function show($id) |
|
85 | + public function show ($id) |
|
86 | 86 | { |
87 | 87 | $type = $this->typeRepository->find($id); |
88 | 88 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | * |
103 | 103 | * @return Response |
104 | 104 | */ |
105 | - public function edit($id) |
|
105 | + public function edit ($id) |
|
106 | 106 | { |
107 | 107 | $type = $this->typeRepository->find($id); |
108 | 108 | |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | * |
124 | 124 | * @return Response |
125 | 125 | */ |
126 | - public function update(UpdateTypeRequest $request, $id) |
|
126 | + public function update (UpdateTypeRequest $request, $id) |
|
127 | 127 | { |
128 | 128 | $type = $this->typeRepository->find($id); |
129 | 129 | |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | * |
150 | 150 | * @return Response |
151 | 151 | */ |
152 | - public function destroy($id) |
|
152 | + public function destroy ($id) |
|
153 | 153 | { |
154 | 154 | $type = $this->typeRepository->find($id); |
155 | 155 |
@@ -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,7 +97,7 @@ 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 ''; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * |
26 | 26 | * @return bool |
27 | 27 | */ |
28 | - public function authorize() |
|
28 | + public function authorize () |
|
29 | 29 | { |
30 | 30 | return true; |
31 | 31 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * |
36 | 36 | * @return array |
37 | 37 | */ |
38 | - public function rules() |
|
38 | + public function rules () |
|
39 | 39 | { |
40 | 40 | return Type::$rules; |
41 | 41 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * |
26 | 26 | * @return bool |
27 | 27 | */ |
28 | - public function authorize() |
|
28 | + public function authorize () |
|
29 | 29 | { |
30 | 30 | return true; |
31 | 31 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * |
36 | 36 | * @return array |
37 | 37 | */ |
38 | - public function rules() |
|
38 | + public function rules () |
|
39 | 39 | { |
40 | 40 | return Type::$rules; |
41 | 41 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | * |
33 | 33 | * @return array |
34 | 34 | */ |
35 | - public function getFieldsSearchable() |
|
35 | + public function getFieldsSearchable () |
|
36 | 36 | { |
37 | 37 | return $this->fieldSearchable; |
38 | 38 | } |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | /** |
41 | 41 | * Configure the Model. |
42 | 42 | **/ |
43 | - public function model() |
|
43 | + public function model () |
|
44 | 44 | { |
45 | 45 | return Type::class; |
46 | 46 | } |