@@ -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( |
@@ -16,14 +16,14 @@ discard block |
||
16 | 16 | return [ |
17 | 17 | // #0, the first case - simple header |
18 | 18 | [ |
19 | - function (): object { |
|
19 | + function(): object { |
|
20 | 20 | // setup |
21 | 21 | unset($_GET['create-button']); |
22 | 22 | $listBuilder = new ListBuilder\Common($this->getFields(), new FakeAdapter($this->getRecords())); |
23 | 23 | $listBuilder->setCustomHeaderActions('custom header actions'); |
24 | 24 | return $listBuilder; |
25 | 25 | }, |
26 | - function ($result): void { |
|
26 | + function($result): void { |
|
27 | 27 | // asserting method |
28 | 28 | $this->assertStringContainsString('<form', $result); |
29 | 29 | $this->assertStringContainsString('</form>', $result); |
@@ -33,14 +33,14 @@ discard block |
||
33 | 33 | ], |
34 | 34 | // #1, the first case - full header |
35 | 35 | [ |
36 | - function (): object { |
|
36 | + function(): object { |
|
37 | 37 | // setup |
38 | 38 | $_GET['create-button'] = 1; |
39 | 39 | $listBuilder = new ListBuilder\Common($this->getFields(), new FakeAdapter($this->getRecords())); |
40 | 40 | $listBuilder->setCustomHeaderActions('custom header actions'); |
41 | 41 | return $listBuilder; |
42 | 42 | }, |
43 | - function ($result): void { |
|
43 | + function($result): void { |
|
44 | 44 | // asserting method |
45 | 45 | $this->assertStringContainsString('<form', $result); |
46 | 46 | $this->assertStringContainsString('</form>', $result); |
@@ -50,14 +50,14 @@ discard block |
||
50 | 50 | ], |
51 | 51 | // #2, the first case - simple header |
52 | 52 | [ |
53 | - function (): object { |
|
53 | + function(): object { |
|
54 | 54 | // setup |
55 | 55 | $_GET['create-button'] = 1; |
56 | 56 | $listBuilder = new ListBuilder\Common($this->getFields(), new FakeAdapter([])); |
57 | 57 | $listBuilder->setCustomHeaderActions('custom header actions'); |
58 | 58 | return $listBuilder; |
59 | 59 | }, |
60 | - function ($result): void { |
|
60 | + function($result): void { |
|
61 | 61 | // asserting method |
62 | 62 | $this->assertStringNotContainsString('<form', $result); |
63 | 63 | $this->assertStringNotContainsString('</form>', $result); |