@@ -34,7 +34,7 @@ |
||
34 | 34 | */ |
35 | 35 | protected function formHeader(bool $flag) |
36 | 36 | { |
37 | - if (! $flag) { |
|
37 | + if (!$flag) { |
|
38 | 38 | $_GET['no-header'] = 1; |
39 | 39 | } else { |
40 | 40 | unset($_GET['no-header']); |
@@ -227,7 +227,7 @@ |
||
227 | 227 | */ |
228 | 228 | public function fetchCustomField(array &$record, string $name): array |
229 | 229 | { |
230 | - if (! isset($this->fieldObjects[$name])) { |
|
230 | + if (!isset($this->fieldObjects[$name])) { |
|
231 | 231 | return $record; |
232 | 232 | } |
233 | 233 |
@@ -24,7 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | public function html(): string |
26 | 26 | { |
27 | - $content = '<textarea class="resizable_textarea '.$this->class.'"'; |
|
27 | + $content = '<textarea class="resizable_textarea ' . $this->class . '"'; |
|
28 | 28 | $content .= $this->required ? ' required="required"' : ''; |
29 | 29 | $content .= ' type="text" name="' . $this->getNamePrefix() . $this->name . |
30 | 30 | ($this->batch ? '[{_creation_form_items_counter}]' : '') . '"'; |
@@ -24,7 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | public function html(): string |
26 | 26 | { |
27 | - $content = '<input class="'.$this->class.'"'; |
|
27 | + $content = '<input class="' . $this->class . '"'; |
|
28 | 28 | $content .= $this->required ? ' required="required"' : ''; |
29 | 29 | $content .= ' type="text" name="' . $this->getNamePrefix() . $this->name . |
30 | 30 | ($this->batch ? '[{_creation_form_items_counter}]' : '') . '"'; |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | 'order' => 'ASC' |
331 | 331 | ], isset($_GET['from']) ? $_GET['from'] : 0, isset($_GET['limit']) ? $_GET['limit'] : 100); |
332 | 332 | |
333 | - if (! empty($records)) { |
|
333 | + if (!empty($records)) { |
|
334 | 334 | $header = $this->listingHeader(); |
335 | 335 | |
336 | 336 | $items = $this->listingItems($records); |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | { |
353 | 353 | $records = $this->listBuilderAdapter->all(); |
354 | 354 | |
355 | - if (! empty($records)) { |
|
355 | + if (!empty($records)) { |
|
356 | 356 | $header = $this->simpleListingHeader(); |
357 | 357 | |
358 | 358 | $items = $this->simpleListingItems($records); |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | */ |
176 | 176 | public function customActionsDataProvider(): array |
177 | 177 | { |
178 | - $setup = function (): object { |
|
178 | + $setup = function(): object { |
|
179 | 179 | // setup method |
180 | 180 | $listBuilder = new ListBuilder($this->getFields(), new FakeAdapter($this->getRecords())); |
181 | 181 | |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | return $listBuilder; |
185 | 185 | }; |
186 | 186 | |
187 | - $assert = function ($result): void { |
|
187 | + $assert = function($result): void { |
|
188 | 188 | // asserting method |
189 | 189 | $this->assertStringNotContainsString('!1!', $result); |
190 | 190 | $this->assertStringNotContainsString('!2!', $result); |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | // #1, listingForm |
201 | 201 | [ |
202 | 202 | $setup, |
203 | - function ($result): void { |
|
203 | + function($result): void { |
|
204 | 204 | // asserting method |
205 | 205 | $this->assertStringContainsString('!1!', $result); |
206 | 206 | $this->assertStringContainsString('!2!', $result); |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | ], |
210 | 210 | // #2, listingForm, no custom buttons |
211 | 211 | [ |
212 | - function (): object { |
|
212 | + function(): object { |
|
213 | 213 | // setup method |
214 | 214 | return new ListBuilder($this->getFields(), new FakeAdapter($this->getRecords())); |
215 | 215 | }, |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | ], |
219 | 219 | // #3, listingForm, no custom buttons |
220 | 220 | [ |
221 | - function (): object { |
|
221 | + function(): object { |
|
222 | 222 | // setup method |
223 | 223 | return new ListBuilder([ |
224 | 224 | 'id' => [ |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | ], |
232 | 232 | // #4, listingForm, no custom buttons |
233 | 233 | [ |
234 | - function (): object { |
|
234 | + function(): object { |
|
235 | 235 | // setup method |
236 | 236 | return new ListBuilder([ |
237 | 237 | 'id' => [ |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | ] |
240 | 240 | ], new FakeAdapter($this->getRecords())); |
241 | 241 | }, |
242 | - function (string $result) use ($assert) { |
|
242 | + function(string $result) use ($assert) { |
|
243 | 243 | $assert($result); |
244 | 244 | |
245 | 245 | $this->assertStringContainsString('Some id field', $result); |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | ], |
251 | 251 | // #5, simpleListingForm, no custom buttons |
252 | 252 | [ |
253 | - function (): object { |
|
253 | + function(): object { |
|
254 | 254 | // setup method |
255 | 255 | return new ListBuilder([ |
256 | 256 | 'title' => [ |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | ] |
259 | 259 | ], new FakeAdapter($this->getRecords())); |
260 | 260 | }, |
261 | - function (string $result) use ($assert) { |
|
261 | + function(string $result) use ($assert) { |
|
262 | 262 | $assert($result); |
263 | 263 | |
264 | 264 | $this->assertStringContainsString('Title field', $result); |
@@ -267,13 +267,13 @@ discard block |
||
267 | 267 | ], |
268 | 268 | // #6, listingForm, default buttons |
269 | 269 | [ |
270 | - function (): object { |
|
270 | + function(): object { |
|
271 | 271 | // setup method |
272 | 272 | $_GET['update-button'] = 1; |
273 | 273 | $_GET['create-button'] = 1; |
274 | 274 | return new ListBuilder($this->getFields(), new FakeAdapter($this->getRecords())); |
275 | 275 | }, |
276 | - function (string $result) use ($assert) { |
|
276 | + function(string $result) use ($assert) { |
|
277 | 277 | $assert($result); |
278 | 278 | |
279 | 279 | $this->assertStringContainsString('>id<', $result); |
@@ -309,7 +309,7 @@ |
||
309 | 309 | 'order' => 'ASC' |
310 | 310 | ], isset($_GET['from']) ? $_GET['from'] : 0, isset($_GET['limit']) ? $_GET['limit'] : 100); |
311 | 311 | |
312 | - if (! empty($records)) { |
|
312 | + if (!empty($records)) { |
|
313 | 313 | $header = $this->listingHeader(); |
314 | 314 | |
315 | 315 | $items = $this->listingItems($records); |
@@ -127,7 +127,7 @@ |
||
127 | 127 | { |
128 | 128 | $records = $this->getListBuilderAdapter()->all(); |
129 | 129 | |
130 | - if (! empty($records)) { |
|
130 | + if (!empty($records)) { |
|
131 | 131 | $header = $this->simpleListingHeader(); |
132 | 132 | |
133 | 133 | $items = $this->simpleListingItems($records); |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | */ |
131 | 131 | public function commonBehaviourDataProvider(): array |
132 | 132 | { |
133 | - $setup = function (): object { |
|
133 | + $setup = function(): object { |
|
134 | 134 | // setup method |
135 | 135 | $listBuilder = new ListBuilder\Common($this->getFields(), new FakeAdapter($this->getRecords())); |
136 | 136 | |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | return $listBuilder; |
140 | 140 | }; |
141 | 141 | |
142 | - $assert = function ($result): void { |
|
142 | + $assert = function($result): void { |
|
143 | 143 | // asserting method |
144 | 144 | $this->assertStringNotContainsString('!1!', $result); |
145 | 145 | $this->assertStringNotContainsString('!2!', $result); |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | // #0, listingForm |
156 | 156 | [ |
157 | 157 | $setup, |
158 | - function ($result): void { |
|
158 | + function($result): void { |
|
159 | 159 | // asserting method |
160 | 160 | $this->assertStringContainsStrings([ |
161 | 161 | '!1!', |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | ], |
166 | 166 | // #1, listingForm, no custom buttons |
167 | 167 | [ |
168 | - function (): object { |
|
168 | + function(): object { |
|
169 | 169 | // setup method |
170 | 170 | return new ListBuilder\Common($this->getFields(), new FakeAdapter($this->getRecords())); |
171 | 171 | }, |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | ], |
174 | 174 | // #2, listingForm, no custom buttons |
175 | 175 | [ |
176 | - function () use ($headerData): object { |
|
176 | + function() use ($headerData): object { |
|
177 | 177 | // setup method |
178 | 178 | return new ListBuilder\Common($headerData, new FakeAdapter($this->getRecords())); |
179 | 179 | }, |
@@ -181,11 +181,11 @@ discard block |
||
181 | 181 | ], |
182 | 182 | // #3, listingForm, no custom buttons |
183 | 183 | [ |
184 | - function () use ($headerData): object { |
|
184 | + function() use ($headerData): object { |
|
185 | 185 | // setup method |
186 | 186 | return new ListBuilder\Common($headerData, new FakeAdapter($this->getRecords())); |
187 | 187 | }, |
188 | - function (string $result) use ($assert) { |
|
188 | + function(string $result) use ($assert) { |
|
189 | 189 | $assert($result); |
190 | 190 | |
191 | 191 | $this->assertStringContainsStrings([ |
@@ -197,13 +197,13 @@ discard block |
||
197 | 197 | ], |
198 | 198 | // #4, listingForm, default buttons |
199 | 199 | [ |
200 | - function (): object { |
|
200 | + function(): object { |
|
201 | 201 | // setup method |
202 | 202 | $_GET['update-button'] = 1; |
203 | 203 | $_GET['create-button'] = 1; |
204 | 204 | return new ListBuilder\Common($this->getFields(), new FakeAdapter($this->getRecords())); |
205 | 205 | }, |
206 | - function (string $result) use ($assert) { |
|
206 | + function(string $result) use ($assert) { |
|
207 | 207 | $assert($result); |
208 | 208 | |
209 | 209 | $this->assertStringContainsStrings([ |
@@ -215,14 +215,14 @@ discard block |
||
215 | 215 | ], |
216 | 216 | // #5, listingForm, custom title and description |
217 | 217 | [ |
218 | - function (): object { |
|
218 | + function(): object { |
|
219 | 219 | // setup method |
220 | 220 | $listBuilder = new ListBuilder\Common($this->getFields(), new FakeAdapter($this->getRecords())); |
221 | 221 | $listBuilder->listTitle = 'List Title'; |
222 | 222 | $listBuilder->listDescription = 'List Description'; |
223 | 223 | return $listBuilder; |
224 | 224 | }, |
225 | - function (string $result) use ($assert) { |
|
225 | + function(string $result) use ($assert) { |
|
226 | 226 | $assert($result); |
227 | 227 | |
228 | 228 | $this->assertStringContainsStrings([ |
@@ -236,11 +236,11 @@ discard block |
||
236 | 236 | ], |
237 | 237 | // #6, listingForm, default title and description |
238 | 238 | [ |
239 | - function (): object { |
|
239 | + function(): object { |
|
240 | 240 | // setup method |
241 | 241 | return new ListBuilder\Common($this->getFields(), new FakeAdapter($this->getRecords())); |
242 | 242 | }, |
243 | - function (string $result) use ($assert) { |
|
243 | + function(string $result) use ($assert) { |
|
244 | 244 | $assert($result); |
245 | 245 | |
246 | 246 | $this->assertStringContainsStrings( |