@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | |
80 | 80 | $form->addField('language', ['DropDown', 'values' => $values, 'caption' => __('Select Language'), 'iconLeft' => 'globe'], ['required'=>true])->set($wizard->recall('language', 'en')); |
81 | 81 | |
82 | - $form->onSubmit(function ($form) use ($wizard) { |
|
82 | + $form->onSubmit(function($form) use ($wizard) { |
|
83 | 83 | $wizard->memorize('language', $form->model['language']); |
84 | 84 | |
85 | 85 | App::setLocale($form->model['language']); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $form->addField('support', ['CheckBox', 'caption' => __('I will not remove "Support -> About" credit page from the application menu.')], ['required'=>true]); |
112 | 112 | $form->addField('store', ['CheckBox', 'caption' => __('I will not remove or rename ":epesi Store" links from the application.', ['epesi' => config('epesi.app.title')])], ['required'=>true]); |
113 | 113 | |
114 | - $form->onSubmit(function ($form) use ($wizard) { |
|
114 | + $form->onSubmit(function($form) use ($wizard) { |
|
115 | 115 | return $wizard->jsNext(); |
116 | 116 | }); |
117 | 117 | |
@@ -139,12 +139,12 @@ discard block |
||
139 | 139 | $form->addField('create', ['CheckBox', 'caption' => __('Create New Database')])->on('change', new jsExpression('if ($(event.target).is(":checked")) alert([])', [__('WARNING: Make sure you have CREATE access level to do this!')])); |
140 | 140 | |
141 | 141 | foreach ($wizard->recall('connection', []) as $name => $value) { |
142 | - if (! $field = $form->fields[$name]?? null) continue; |
|
142 | + if (!$field = $form->fields[$name]?? null) continue; |
|
143 | 143 | |
144 | 144 | $field->set($value); |
145 | 145 | } |
146 | 146 | |
147 | - $form->onSubmit(function ($form) use ($wizard) { |
|
147 | + $form->onSubmit(function($form) use ($wizard) { |
|
148 | 148 | $connection = $form->model->get(); |
149 | 149 | |
150 | 150 | $wizard->memorize('connection', $connection); |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | |
193 | 193 | $form->setValues($wizard->recall('user')); |
194 | 194 | |
195 | - $form->validate(function ($form) use ($wizard) { |
|
195 | + $form->validate(function($form) use ($wizard) { |
|
196 | 196 | $wizard->memorize('user', $form->model->get()); |
197 | 197 | |
198 | 198 | return $wizard->jsNext(); |
@@ -139,7 +139,9 @@ |
||
139 | 139 | $form->addField('create', ['CheckBox', 'caption' => __('Create New Database')])->on('change', new jsExpression('if ($(event.target).is(":checked")) alert([])', [__('WARNING: Make sure you have CREATE access level to do this!')])); |
140 | 140 | |
141 | 141 | foreach ($wizard->recall('connection', []) as $name => $value) { |
142 | - if (! $field = $form->fields[$name]?? null) continue; |
|
142 | + if (! $field = $form->fields[$name]?? null) { |
|
143 | + continue; |
|
144 | + } |
|
143 | 145 | |
144 | 146 | $field->set($value); |
145 | 147 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | |
88 | 88 | public function addLegend($container = null) |
89 | 89 | { |
90 | - $container = $container?: $this; |
|
90 | + $container = $container ?: $this; |
|
91 | 91 | |
92 | 92 | $legend = $container->add(['Header', __('Scan of Environment Parameters')])->setStyle('margin-left', '2em'); |
93 | 93 | $legend = $container->add('View')->setStyle('margin-left', 'auto'); |
@@ -99,9 +99,9 @@ discard block |
||
99 | 99 | |
100 | 100 | public function addGroupResults($group, $testResults = [], $container = null) |
101 | 101 | { |
102 | - if (! $testResults) return; |
|
102 | + if (!$testResults) return; |
|
103 | 103 | |
104 | - $container = $container?: $this; |
|
104 | + $container = $container ?: $this; |
|
105 | 105 | |
106 | 106 | $container->add(['Header', $group]); |
107 | 107 | |
@@ -123,13 +123,13 @@ discard block |
||
123 | 123 | |
124 | 124 | @Schema::dropIfExists('test'); |
125 | 125 | |
126 | - @Schema::create('test', function (Blueprint $table) { |
|
126 | + @Schema::create('test', function(Blueprint $table) { |
|
127 | 127 | $table->increments('id'); |
128 | 128 | }); |
129 | 129 | |
130 | 130 | $create = Schema::hasTable('test'); |
131 | 131 | |
132 | - @Schema::table('test', function (Blueprint $table) { |
|
132 | + @Schema::table('test', function(Blueprint $table) { |
|
133 | 133 | $table->addColumn('TEXT', 'field_name'); |
134 | 134 | }); |
135 | 135 | |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | $delete = @DB::delete('DELETE FROM test'); |
141 | 141 | @Schema::dropIfExists('test'); |
142 | 142 | |
143 | - $drop = ! Schema::hasTable('test'); |
|
143 | + $drop = !Schema::hasTable('test'); |
|
144 | 144 | |
145 | 145 | ob_end_clean(); |
146 | 146 | |
@@ -149,8 +149,8 @@ discard block |
||
149 | 149 | array_walk($result, function(& $testResult, $testName) { |
150 | 150 | $testResult = [ |
151 | 151 | 'name' => __(':permission permission', ['permission' => strtoupper($testName)]), |
152 | - 'result' => $testResult? __('OK'): __('Failed'), |
|
153 | - 'severity' => $testResult? 0: 2 |
|
152 | + 'result' => $testResult ? __('OK') : __('Failed'), |
|
153 | + 'severity' => $testResult ? 0 : 2 |
|
154 | 154 | ]; |
155 | 155 | }); |
156 | 156 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | |
160 | 160 | protected function unitToInt($string) |
161 | 161 | { |
162 | - return (int) preg_replace_callback('/(\-?\d+)(.?)/', function ($m) { |
|
162 | + return (int) preg_replace_callback('/(\-?\d+)(.?)/', function($m) { |
|
163 | 163 | return $m[1] * pow(1024, strpos('BKMG', $m[2])); |
164 | 164 | }, strtoupper($string)); |
165 | 165 | } |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | $ret[] = [ |
173 | 173 | 'name' => __('PHP version required :version', ['version' => $requiredPhpVersion]), |
174 | 174 | 'result' => PHP_VERSION, |
175 | - 'severity' => version_compare(PHP_VERSION, $requiredPhpVersion, '>=')? 0: 2 |
|
175 | + 'severity' => version_compare(PHP_VERSION, $requiredPhpVersion, '>=') ? 0 : 2 |
|
176 | 176 | ]; |
177 | 177 | } |
178 | 178 | |
@@ -208,8 +208,8 @@ discard block |
||
208 | 208 | $result = $callback($extension); |
209 | 209 | |
210 | 210 | $ret[] = array_merge($test, [ |
211 | - 'result' => $result? __('OK'): __('Missing'), |
|
212 | - 'severity' => $result? 0: $test['severity'] |
|
211 | + 'result' => $result ? __('OK') : __('Missing'), |
|
212 | + 'severity' => $result ? 0 : $test['severity'] |
|
213 | 213 | ]); |
214 | 214 | } |
215 | 215 | } |