Passed
Push — master ( 1a1018...574200 )
by Alex
04:13
created
Mezon/Gui/Tests/Common/ListBuilderUnitTest.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      */
144 144
     public function commonBehaviourDataProvider(): array
145 145
     {
146
-        $setup = function (): object {
146
+        $setup = function(): object {
147 147
             // setup method
148 148
             $listBuilder = new ListBuilder\Common($this->getFields(), new FakeAdapter($this->getRecords()));
149 149
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
             return $listBuilder;
153 153
         };
154 154
 
155
-        $assert = function (string $result): void {
155
+        $assert = function(string $result): void {
156 156
             // asserting method
157 157
             $this->assertStringNotContainsString('!1!', $result);
158 158
             $this->assertStringNotContainsString('!2!', $result);
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
             // #0, listingForm
169 169
             [
170 170
                 $setup,
171
-                function (string $result): void {
171
+                function(string $result): void {
172 172
                     // asserting method
173 173
                     $this->assertStringContainsStrings([
174 174
                         '!1!',
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
             ],
179 179
             // #1, listingForm, no custom buttons
180 180
             [
181
-                function (): object {
181
+                function(): object {
182 182
                     // setup method
183 183
                     return new ListBuilder\Common($this->getFields(), new FakeAdapter($this->getRecords()));
184 184
                 },
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
             ],
187 187
             // #2, listingForm, no custom buttons
188 188
             [
189
-                function () use ($headerData): object {
189
+                function() use ($headerData): object {
190 190
                     // setup method
191 191
                     return new ListBuilder\Common($headerData, new FakeAdapter($this->getRecords()));
192 192
                 },
@@ -194,11 +194,11 @@  discard block
 block discarded – undo
194 194
             ],
195 195
             // #3, listingForm, no custom buttons
196 196
             [
197
-                function () use ($headerData): object {
197
+                function() use ($headerData): object {
198 198
                     // setup method
199 199
                     return new ListBuilder\Common($headerData, new FakeAdapter($this->getRecords()));
200 200
                 },
201
-                function (string $result) use ($assert) {
201
+                function(string $result) use ($assert) {
202 202
                     $assert($result);
203 203
 
204 204
                     $this->assertStringContainsStrings([
@@ -210,13 +210,13 @@  discard block
 block discarded – undo
210 210
             ],
211 211
             // #4, listingForm, default buttons
212 212
             [
213
-                function (): object {
213
+                function(): object {
214 214
                     // setup method
215 215
                     $_GET['update-button'] = 1;
216 216
                     $_GET['create-button'] = 1;
217 217
                     return new ListBuilder\Common($this->getFields(), new FakeAdapter($this->getRecords()));
218 218
                 },
219
-                function (string $result) use ($assert) {
219
+                function(string $result) use ($assert) {
220 220
                     $assert($result);
221 221
 
222 222
                     $this->assertStringContainsStrings([
@@ -228,14 +228,14 @@  discard block
 block discarded – undo
228 228
             ],
229 229
             // #5, listingForm, custom title and description
230 230
             [
231
-                function (): object {
231
+                function(): object {
232 232
                     // setup method
233 233
                     $listBuilder = new ListBuilder\Common($this->getFields(), new FakeAdapter($this->getRecords()));
234 234
                     $listBuilder->listTitle = 'List Title';
235 235
                     $listBuilder->listDescription = 'List Description';
236 236
                     return $listBuilder;
237 237
                 },
238
-                function (string $result) use ($assert) {
238
+                function(string $result) use ($assert) {
239 239
                     $assert($result);
240 240
 
241 241
                     $this->assertStringContainsStrings([
@@ -249,11 +249,11 @@  discard block
 block discarded – undo
249 249
             ],
250 250
             // #6, listingForm, default title and description
251 251
             [
252
-                function (): object {
252
+                function(): object {
253 253
                     // setup method
254 254
                     return new ListBuilder\Common($this->getFields(), new FakeAdapter($this->getRecords()));
255 255
                 },
256
-                function (string $result) use ($assert) {
256
+                function(string $result) use ($assert) {
257 257
                     $assert($result);
258 258
 
259 259
                     $this->assertStringContainsStrings(
Please login to merge, or discard this patch.
Mezon/Gui/Tests/Common/NoItemsCreateButtonUnitTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,27 +22,27 @@
 block discarded – undo
22 22
         return [
23 23
             // #0, the first case - empty listing
24 24
             [
25
-                function (): object {
25
+                function(): object {
26 26
                     // setup
27 27
                     unset($_GET['create-button']);
28 28
                     return new ListBuilder\Common($this->getFields(), new FakeAdapter([]));
29 29
                 },
30
-                function (string $result): void {
30
+                function(string $result): void {
31 31
                     // asserting method
32 32
                     $this->assertStringNotContainsString('create-button"', $result);
33 33
                 }
34 34
             ],
35 35
             // #1, the second case - full header
36 36
             [
37
-                function (): object {
37
+                function(): object {
38 38
                     // setup
39 39
                     $_GET['create-button'] = 1;
40
-                    if(isset($_GET['create-page-endpoint'])){
40
+                    if (isset($_GET['create-page-endpoint'])) {
41 41
                         unset($_GET['create-page-endpoint']);
42 42
                     }
43 43
                     return new ListBuilder\Common($this->getFields(), new FakeAdapter([]));
44 44
                 },
45
-                function (string $result): void {
45
+                function(string $result): void {
46 46
                     // asserting method
47 47
                     $this->assertStringContainsString('../create/', $result);
48 48
                 }
Please login to merge, or discard this patch.
Mezon/Gui/Tests/Common/CustomHeaderActionsUnitTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,14 +22,14 @@  discard block
 block discarded – undo
22 22
         return [
23 23
             // #0, the first case - simple header
24 24
             [
25
-                function (): object {
25
+                function(): object {
26 26
                     // setup
27 27
                     unset($_GET['create-button']);
28 28
                     $listBuilder = new ListBuilder\Common($this->getFields(), new FakeAdapter($this->getRecords()));
29 29
                     $listBuilder->setCustomHeaderActions('custom header actions');
30 30
                     return $listBuilder;
31 31
                 },
32
-                function (string $result): void {
32
+                function(string $result): void {
33 33
                     // asserting method
34 34
                     $this->assertStringContainsString('<form', $result);
35 35
                     $this->assertStringContainsString('</form>', $result);
@@ -39,14 +39,14 @@  discard block
 block discarded – undo
39 39
             ],
40 40
             // #1, the second case - full header
41 41
             [
42
-                function (): object {
42
+                function(): object {
43 43
                     // setup
44 44
                     $_GET['create-button'] = 1;
45 45
                     $listBuilder = new ListBuilder\Common($this->getFields(), new FakeAdapter($this->getRecords()));
46 46
                     $listBuilder->setCustomHeaderActions('custom header actions');
47 47
                     return $listBuilder;
48 48
                 },
49
-                function (string $result): void {
49
+                function(string $result): void {
50 50
                     // asserting method
51 51
                     $this->assertStringContainsString('<form', $result);
52 52
                     $this->assertStringContainsString('</form>', $result);
@@ -56,14 +56,14 @@  discard block
 block discarded – undo
56 56
             ],
57 57
             // #2, the third case - simple header
58 58
             [
59
-                function (): object {
59
+                function(): object {
60 60
                     // setup
61 61
                     $_GET['create-button'] = 1;
62 62
                     $listBuilder = new ListBuilder\Common($this->getFields(), new FakeAdapter([]));
63 63
                     $listBuilder->setCustomHeaderActions('custom header actions');
64 64
                     return $listBuilder;
65 65
                 },
66
-                function (string $result): void {
66
+                function(string $result): void {
67 67
                     // asserting method
68 68
                     $this->assertStringNotContainsString('<form', $result);
69 69
                     $this->assertStringNotContainsString('</form>', $result);
Please login to merge, or discard this patch.