Skip to content

Commit 478a49c

Browse files
committed
Apply fixes from StyleCI
1 parent 7fbf2c9 commit 478a49c

34 files changed

+382
-406
lines changed

database/migrations/2021_05_26_123406_create_settings_table.php

+93-106
Original file line numberDiff line numberDiff line change
@@ -66,202 +66,189 @@ private function populateDummyData()
6666
$admin->roles()->attach($role);
6767
$admin->profile()->create();
6868
}
69-
\DB::table('settings')->insert(array(
70-
0 =>
71-
array(
69+
\DB::table('settings')->insert([
70+
0 => [
7271
'id' => 5,
7372
'setting_name' => 'logo',
74-
'string_value' => NULL,
75-
'integer_value' => NULL,
76-
'text_value' => NULL,
77-
'boolean_value' => NULL,
78-
'setting_json' => NULL,
73+
'string_value' => null,
74+
'integer_value' => null,
75+
'text_value' => null,
76+
'boolean_value' => null,
77+
'setting_json' => null,
7978
'setting_custom' => '"{\\r\\n \\"class\\": \\"logo\\",\\r\\n \\"id\\": \\"logo\\"\\r\\n}"',
8079
'setting_type' => 10,
8180
'setting_group' => 'multimedia',
8281
'created_at' => '2023-03-23 08:19:08',
8382
'updated_at' => '2023-03-23 08:19:08',
84-
),
85-
1 =>
86-
array(
83+
],
84+
1 => [
8785
'id' => 6,
8886
'setting_name' => 'favicon',
89-
'string_value' => NULL,
90-
'integer_value' => NULL,
91-
'text_value' => NULL,
92-
'boolean_value' => NULL,
93-
'setting_json' => NULL,
87+
'string_value' => null,
88+
'integer_value' => null,
89+
'text_value' => null,
90+
'boolean_value' => null,
91+
'setting_json' => null,
9492
'setting_custom' => '"{\\r\\n \\"class\\": \\"favicon\\",\\r\\n \\"id\\": \\"favicon\\"\\r\\n}"',
9593
'setting_type' => 10,
9694
'setting_group' => 'multimedia',
9795
'created_at' => '2023-03-23 08:19:26',
9896
'updated_at' => '2023-03-23 08:19:26',
99-
),
100-
2 =>
101-
array(
97+
],
98+
2 => [
10299
'id' => 7,
103100
'setting_name' => 'dark_logo',
104-
'string_value' => NULL,
105-
'integer_value' => NULL,
106-
'text_value' => NULL,
107-
'boolean_value' => NULL,
108-
'setting_json' => NULL,
101+
'string_value' => null,
102+
'integer_value' => null,
103+
'text_value' => null,
104+
'boolean_value' => null,
105+
'setting_json' => null,
109106
'setting_custom' => '"{\\r\\n \\"class\\": \\"dark_logo\\",\\r\\n \\"id\\": \\"dark_logo\\"\\r\\n}"',
110107
'setting_type' => 10,
111108
'setting_group' => 'multimedia',
112109
'created_at' => '2023-03-23 08:19:45',
113110
'updated_at' => '2023-03-23 08:19:45',
114-
),
115-
3 =>
116-
array(
111+
],
112+
3 => [
117113
'id' => 8,
118114
'setting_name' => 'logobanner',
119-
'string_value' => NULL,
120-
'integer_value' => NULL,
121-
'text_value' => NULL,
122-
'boolean_value' => NULL,
123-
'setting_json' => NULL,
115+
'string_value' => null,
116+
'integer_value' => null,
117+
'text_value' => null,
118+
'boolean_value' => null,
119+
'setting_json' => null,
124120
'setting_custom' => '"{\\r\\n \\"class\\": \\"logoBanner\\",\\r\\n \\"id\\": \\"logoBanner\\"\\r\\n}"',
125121
'setting_type' => 10,
126122
'setting_group' => 'multimedia',
127123
'created_at' => '2023-03-23 08:20:00',
128124
'updated_at' => '2023-03-23 08:20:00',
129-
),
130-
4 =>
131-
array(
125+
],
126+
4 => [
132127
'id' => 9,
133128
'setting_name' => 'login_register_bg_image',
134-
'string_value' => NULL,
135-
'integer_value' => NULL,
136-
'text_value' => NULL,
137-
'boolean_value' => NULL,
138-
'setting_json' => NULL,
129+
'string_value' => null,
130+
'integer_value' => null,
131+
'text_value' => null,
132+
'boolean_value' => null,
133+
'setting_json' => null,
139134
'setting_custom' => '"{\\r\\n \\"class\\": \\"login_register_bg_image\\",\\r\\n \\"id\\": \\"login_register_bg_image\\"\\r\\n}"',
140135
'setting_type' => 10,
141136
'setting_group' => 'multimedia',
142137
'created_at' => '2023-03-23 08:20:15',
143138
'updated_at' => '2023-03-23 08:20:15',
144-
),
145-
5 =>
146-
array(
139+
],
140+
5 => [
147141
'id' => 10,
148142
'setting_name' => 'title',
149-
'string_value' => NULL,
150-
'integer_value' => NULL,
151-
'text_value' => NULL,
152-
'boolean_value' => NULL,
153-
'setting_json' => NULL,
143+
'string_value' => null,
144+
'integer_value' => null,
145+
'text_value' => null,
146+
'boolean_value' => null,
147+
'setting_json' => null,
154148
'setting_custom' => '"{\\r\\n \\"class\\": \\"title\\",\\r\\n \\"id\\": \\"title\\",\\r\\n \\"placeholder\\": \\"Site Title Here!!\\"\\r\\n}"',
155149
'setting_type' => 1,
156150
'setting_group' => 'general',
157151
'created_at' => '2023-03-23 08:20:41',
158152
'updated_at' => '2023-03-23 08:20:41',
159-
),
160-
6 =>
161-
array(
153+
],
154+
6 => [
162155
'id' => 11,
163156
'setting_name' => 'description',
164-
'string_value' => NULL,
165-
'integer_value' => NULL,
166-
'text_value' => NULL,
167-
'boolean_value' => NULL,
168-
'setting_json' => NULL,
157+
'string_value' => null,
158+
'integer_value' => null,
159+
'text_value' => null,
160+
'boolean_value' => null,
161+
'setting_json' => null,
169162
'setting_custom' => '"{\\r\\n \\"class\\": \\"description\\",\\r\\n \\"id\\": \\"description\\"\\r\\n}"',
170163
'setting_type' => 3,
171164
'setting_group' => 'general',
172165
'created_at' => '2023-03-23 08:23:45',
173166
'updated_at' => '2023-03-23 08:23:45',
174-
),
175-
7 =>
176-
array(
167+
],
168+
7 => [
177169
'id' => 12,
178170
'setting_name' => 'phone',
179-
'string_value' => NULL,
180-
'integer_value' => NULL,
181-
'text_value' => NULL,
182-
'boolean_value' => NULL,
183-
'setting_json' => NULL,
171+
'string_value' => null,
172+
'integer_value' => null,
173+
'text_value' => null,
174+
'boolean_value' => null,
175+
'setting_json' => null,
184176
'setting_custom' => '"{\\r\\n \\"class\\": \\"phone\\",\\r\\n \\"id\\": \\"phone\\",\\r\\n \\"placeholder\\": \\"Phone Number\\",\\r\\n \\"max\\": 9899999999,\\r\\n \\"min\\": 9000000000\\r\\n}"',
185177
'setting_type' => 2,
186178
'setting_group' => 'general',
187179
'created_at' => '2023-03-23 08:24:52',
188180
'updated_at' => '2023-03-23 08:24:52',
189-
),
190-
8 =>
191-
array(
181+
],
182+
8 => [
192183
'id' => 13,
193184
'setting_name' => 'email',
194-
'string_value' => NULL,
195-
'integer_value' => NULL,
196-
'text_value' => NULL,
197-
'boolean_value' => NULL,
198-
'setting_json' => NULL,
185+
'string_value' => null,
186+
'integer_value' => null,
187+
'text_value' => null,
188+
'boolean_value' => null,
189+
'setting_json' => null,
199190
'setting_custom' => '"{\\r\\n \\"class\\": \\"email\\",\\r\\n \\"id\\": \\"email\\",\\r\\n \\"placeholder\\": \\"Email Address\\"\\r\\n}"',
200191
'setting_type' => 1,
201192
'setting_group' => 'general',
202193
'created_at' => '2023-03-23 08:25:21',
203194
'updated_at' => '2023-03-23 08:25:21',
204-
),
205-
9 =>
206-
array(
195+
],
196+
9 => [
207197
'id' => 14,
208198
'setting_name' => 'currency',
209-
'string_value' => NULL,
210-
'integer_value' => NULL,
211-
'text_value' => NULL,
212-
'boolean_value' => NULL,
213-
'setting_json' => NULL,
199+
'string_value' => null,
200+
'integer_value' => null,
201+
'text_value' => null,
202+
'boolean_value' => null,
203+
'setting_json' => null,
214204
'setting_custom' => '"{\\r\\n \\"class\\": \\"currency\\",\\r\\n \\"id\\": \\"currency\\",\\r\\n \\"value\\": \\"Rs.\\",\\r\\n \\"placeholder\\": \\"Currency Symbol\\"\\r\\n}"',
215205
'setting_type' => 1,
216206
'setting_group' => 'general',
217207
'created_at' => '2023-03-23 08:25:50',
218208
'updated_at' => '2023-03-23 08:25:50',
219-
),
220-
10 =>
221-
array(
209+
],
210+
10 => [
222211
'id' => 15,
223212
'setting_name' => 'date_mode',
224-
'string_value' => NULL,
225-
'integer_value' => NULL,
226-
'text_value' => NULL,
227-
'boolean_value' => NULL,
228-
'setting_json' => NULL,
213+
'string_value' => null,
214+
'integer_value' => null,
215+
'text_value' => null,
216+
'boolean_value' => null,
217+
'setting_json' => null,
229218
'setting_custom' => '"{\\r\\n \\"class\\": \\"date_mode\\",\\r\\n \\"id\\": \\"date_mode\\",\\r\\n \\"default\\": \\"1\\",\\r\\n \\"options\\": {\\r\\n \\"bs\\": \\"bs\\",\\r\\n \\"ad\\": \\"ad\\"\\r\\n }\\r\\n}"',
230219
'setting_type' => 7,
231220
'setting_group' => 'general',
232221
'created_at' => '2023-03-23 08:27:12',
233222
'updated_at' => '2023-03-23 08:27:12',
234-
),
235-
11 =>
236-
array(
223+
],
224+
11 => [
237225
'id' => 16,
238226
'setting_name' => 'map',
239-
'string_value' => NULL,
240-
'integer_value' => NULL,
241-
'text_value' => NULL,
242-
'boolean_value' => NULL,
243-
'setting_json' => NULL,
227+
'string_value' => null,
228+
'integer_value' => null,
229+
'text_value' => null,
230+
'boolean_value' => null,
231+
'setting_json' => null,
244232
'setting_custom' => '"{\\r\\n \\"class\\": \\"map\\",\\r\\n \\"id\\": \\"map\\"\\r\\n}"',
245233
'setting_type' => 3,
246234
'setting_group' => 'general',
247235
'created_at' => '2023-03-23 08:27:44',
248236
'updated_at' => '2023-03-23 08:27:44',
249-
),
250-
12 =>
251-
array(
237+
],
238+
12 => [
252239
'id' => 17,
253240
'setting_name' => 'address',
254-
'string_value' => NULL,
255-
'integer_value' => NULL,
256-
'text_value' => NULL,
257-
'boolean_value' => NULL,
258-
'setting_json' => NULL,
241+
'string_value' => null,
242+
'integer_value' => null,
243+
'text_value' => null,
244+
'boolean_value' => null,
245+
'setting_json' => null,
259246
'setting_custom' => '"{\\r\\n \\"class\\": \\"address\\",\\r\\n \\"id\\": \\"address\\",\\r\\n \\"placeholder\\": \\"Address Here\\"\\r\\n}"',
260247
'setting_type' => 1,
261248
'setting_group' => 'general',
262249
'created_at' => '2023-03-23 08:28:27',
263250
'updated_at' => '2023-03-23 08:28:27',
264-
),
265-
));
251+
],
252+
]);
266253
}
267254
}

src/Console/Commands/AdmineticDummyCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
use App\Models\User;
66
use Illuminate\Console\Command;
7+
use Illuminate\Support\Facades\Artisan;
78
use Illuminate\Support\Facades\DB;
89
use Illuminate\Support\Facades\Hash;
9-
use Illuminate\Support\Facades\Artisan;
1010
use Pratiksh\Adminetic\Models\Admin\Role;
1111

1212
class AdmineticDummyCommand extends Command
@@ -42,7 +42,7 @@ public function __construct()
4242
*/
4343
public function handle()
4444
{
45-
if (!config('adminetic.migrate_with_dummy', false)) {
45+
if (! config('adminetic.migrate_with_dummy', false)) {
4646
// Generating Roles
4747
$roles = [
4848
[

src/Console/Commands/InstallAdmineticCommand.php

+13-13
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function handle()
7272

7373
private function addAdminServiceProvider()
7474
{
75-
$adminServiceProviderTemplate = file_get_contents(__DIR__ . '/../../Console/Commands/AdminStubs/AdminServiceProvider.stub');
75+
$adminServiceProviderTemplate = file_get_contents(__DIR__.'/../../Console/Commands/AdminStubs/AdminServiceProvider.stub');
7676
$adminServiceProviderfile = app_path('Providers/AdminServiceProvider.php');
7777
file_put_contents($adminServiceProviderfile, $adminServiceProviderTemplate);
7878
if (file_exists($adminServiceProviderfile)) {
@@ -84,9 +84,9 @@ private function addAdminServiceProvider()
8484

8585
private function addMyMenu()
8686
{
87-
$modelTemplate = file_get_contents(__DIR__ . '/../../Console/Commands/AdminStubs/MyMenu.stub');
87+
$modelTemplate = file_get_contents(__DIR__.'/../../Console/Commands/AdminStubs/MyMenu.stub');
8888

89-
if (!file_exists($path = app_path('Services'))) {
89+
if (! file_exists($path = app_path('Services'))) {
9090
mkdir($path, 0777, true);
9191
}
9292

@@ -101,16 +101,16 @@ private function addMyMenu()
101101

102102
private function addMyDashboard()
103103
{
104-
$myDashboardTemplate = file_get_contents(__DIR__ . '/../../Console/Commands/AdminStubs/MyDashboard.stub');
105-
$myDashboardIndexTemplate = file_get_contents(__DIR__ . '/../../Console/Commands/AdminStubs/DashboardIndex.stub');
104+
$myDashboardTemplate = file_get_contents(__DIR__.'/../../Console/Commands/AdminStubs/MyDashboard.stub');
105+
$myDashboardIndexTemplate = file_get_contents(__DIR__.'/../../Console/Commands/AdminStubs/DashboardIndex.stub');
106106

107-
if (!file_exists($path = app_path('Services'))) {
107+
if (! file_exists($path = app_path('Services'))) {
108108
mkdir($path, 0777, true);
109109
}
110-
if (!file_exists($path = resource_path('views/admin/dashboard'))) {
110+
if (! file_exists($path = resource_path('views/admin/dashboard'))) {
111111
mkdir($path, 0777, true);
112112
}
113-
if (!file_exists($path = resource_path('views/admin/layouts/modules/dashboard'))) {
113+
if (! file_exists($path = resource_path('views/admin/layouts/modules/dashboard'))) {
114114
mkdir($path, 0777, true);
115115
}
116116
$myDashboardIndexfile = resource_path('views/admin/dashboard/index.blade.php');
@@ -139,9 +139,9 @@ private function addMyDashboard()
139139

140140
protected function addHeader()
141141
{
142-
$myHeaderTemplate = file_get_contents(__DIR__ . '/../../Console/Commands/AdminStubs/HeaderView.stub');
142+
$myHeaderTemplate = file_get_contents(__DIR__.'/../../Console/Commands/AdminStubs/HeaderView.stub');
143143

144-
if (!file_exists($path = resource_path('views/admin/layouts/components'))) {
144+
if (! file_exists($path = resource_path('views/admin/layouts/components'))) {
145145
mkdir($path, 0777, true);
146146
}
147147

@@ -156,9 +156,9 @@ protected function addHeader()
156156

157157
protected function addFooter()
158158
{
159-
$myFooterTemplate = file_get_contents(__DIR__ . '/../../Console/Commands/AdminStubs/FooterView.stub');
159+
$myFooterTemplate = file_get_contents(__DIR__.'/../../Console/Commands/AdminStubs/FooterView.stub');
160160

161-
if (!file_exists($path = resource_path('views/admin/layouts/components'))) {
161+
if (! file_exists($path = resource_path('views/admin/layouts/components'))) {
162162
mkdir($path, 0777, true);
163163
}
164164

@@ -173,6 +173,6 @@ protected function addFooter()
173173

174174
protected static function getStub($type)
175175
{
176-
return file_get_contents(__DIR__ . "/../../Console/Commands/AdminStubs/$type.stub");
176+
return file_get_contents(__DIR__."/../../Console/Commands/AdminStubs/$type.stub");
177177
}
178178
}

0 commit comments

Comments
 (0)