Passed
Push — master ( 4d86c4...586e6b )
by Alex
02:58
created
Mezon/Gui/Tests/Common/ListBuilderUnitTest.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $listBuilder = new ListBuilder\Common($this->getFields(), new FakeAdapter($records));
119 119
         $listBuilder->listTitle = 'Some list title';
120 120
         $listBuilder->setRecordTransformer(
121
-            function (object $record): object {
121
+            function(object $record): object {
122 122
                 Functional::setField($record, 'transformed', 'transformed!');
123 123
                 return $record;
124 124
             });
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      */
151 151
     public function commonBehaviourDataProvider(): array
152 152
     {
153
-        $setup = function (): object {
153
+        $setup = function(): object {
154 154
             // setup method
155 155
             $listBuilder = new ListBuilder\Common($this->getFields(), new FakeAdapter($this->getRecords()));
156 156
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
             return $listBuilder;
160 160
         };
161 161
 
162
-        $assert = function (string $result): void {
162
+        $assert = function(string $result): void {
163 163
             // asserting method
164 164
             $this->assertStringNotContainsString('!1!', $result);
165 165
             $this->assertStringNotContainsString('!2!', $result);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
             // #0, listingForm
176 176
             [
177 177
                 $setup,
178
-                function (string $result): void {
178
+                function(string $result): void {
179 179
                     // asserting method
180 180
                     $this->assertStringContainsStrings([
181 181
                         '!1!',
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
             ],
186 186
             // #1, listingForm, no custom buttons
187 187
             [
188
-                function (): object {
188
+                function(): object {
189 189
                     // setup method
190 190
                     return new ListBuilder\Common($this->getFields(), new FakeAdapter($this->getRecords()));
191 191
                 },
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
             ],
194 194
             // #2, listingForm, no custom buttons
195 195
             [
196
-                function () use ($headerData): object {
196
+                function() use ($headerData): object {
197 197
                     // setup method
198 198
                     return new ListBuilder\Common($headerData, new FakeAdapter($this->getRecords()));
199 199
                 },
@@ -201,11 +201,11 @@  discard block
 block discarded – undo
201 201
             ],
202 202
             // #3, listingForm, no custom buttons
203 203
             [
204
-                function () use ($headerData): object {
204
+                function() use ($headerData): object {
205 205
                     // setup method
206 206
                     return new ListBuilder\Common($headerData, new FakeAdapter($this->getRecords()));
207 207
                 },
208
-                function (string $result) use ($assert) {
208
+                function(string $result) use ($assert) {
209 209
                     $assert($result);
210 210
 
211 211
                     $this->assertStringContainsStrings([
@@ -217,13 +217,13 @@  discard block
 block discarded – undo
217 217
             ],
218 218
             // #4, listingForm, default buttons
219 219
             [
220
-                function (): object {
220
+                function(): object {
221 221
                     // setup method
222 222
                     $_GET['update-button'] = 1;
223 223
                     $_GET['create-button'] = 1;
224 224
                     return new ListBuilder\Common($this->getFields(), new FakeAdapter($this->getRecords()));
225 225
                 },
226
-                function (string $result) use ($assert) {
226
+                function(string $result) use ($assert) {
227 227
                     $assert($result);
228 228
 
229 229
                     $this->assertStringContainsStrings([
@@ -235,14 +235,14 @@  discard block
 block discarded – undo
235 235
             ],
236 236
             // #5, listingForm, custom title and description
237 237
             [
238
-                function (): object {
238
+                function(): object {
239 239
                     // setup method
240 240
                     $listBuilder = new ListBuilder\Common($this->getFields(), new FakeAdapter($this->getRecords()));
241 241
                     $listBuilder->listTitle = 'List Title';
242 242
                     $listBuilder->listDescription = 'List Description';
243 243
                     return $listBuilder;
244 244
                 },
245
-                function (string $result) use ($assert) {
245
+                function(string $result) use ($assert) {
246 246
                     $assert($result);
247 247
 
248 248
                     $this->assertStringContainsStrings([
@@ -256,11 +256,11 @@  discard block
 block discarded – undo
256 256
             ],
257 257
             // #6, listingForm, default title and description
258 258
             [
259
-                function (): object {
259
+                function(): object {
260 260
                     // setup method
261 261
                     return new ListBuilder\Common($this->getFields(), new FakeAdapter($this->getRecords()));
262 262
                 },
263
-                function (string $result) use ($assert) {
263
+                function(string $result) use ($assert) {
264 264
                     $assert($result);
265 265
 
266 266
                     $this->assertStringContainsStrings(
Please login to merge, or discard this patch.
Mezon/Gui/Tests/Simple/ListBuilderUnitTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $listBuilder = new ListBuilder\Simple($this->getFields(), new FakeAdapter($records));
87 87
         $listBuilder->listTitle = 'Some list title';
88 88
         $listBuilder->setRecordTransformer(
89
-            function (object $record): object {
89
+            function(object $record): object {
90 90
                 Functional::setField($record, 'transformed', 'transformed!');
91 91
                 return $record;
92 92
             });
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      */
119 119
     public function commonBehaviourDataProvider(): array
120 120
     {
121
-        $assert = function (string $result): void {
121
+        $assert = function(string $result): void {
122 122
             // asserting method
123 123
             $this->assertStringNotContainsString('!1!', $result);
124 124
             $this->assertStringNotContainsString('!2!', $result);
@@ -127,14 +127,14 @@  discard block
 block discarded – undo
127 127
         return [
128 128
             // #0, listingForm, custom title and description
129 129
             [
130
-                function (): object {
130
+                function(): object {
131 131
                     // setup method
132 132
                     $listBuilder = new ListBuilder\Simple($this->getFields(), new FakeAdapter($this->getRecords()));
133 133
                     $listBuilder->listTitle = 'List Title';
134 134
                     $listBuilder->listDescription = 'List Description';
135 135
                     return $listBuilder;
136 136
                 },
137
-                function (string $result) use ($assert) {
137
+                function(string $result) use ($assert) {
138 138
                     $assert($result);
139 139
 
140 140
                     $this->assertStringContainsStrings([
@@ -148,11 +148,11 @@  discard block
 block discarded – undo
148 148
             ],
149 149
             // #1, listingForm, default title and description
150 150
             [
151
-                function (): object {
151
+                function(): object {
152 152
                     // setup method
153 153
                     return new ListBuilder\Simple($this->getFields(), new FakeAdapter($this->getRecords()));
154 154
                 },
155
-                function (string $result) use ($assert) {
155
+                function(string $result) use ($assert) {
156 156
                     $assert($result);
157 157
 
158 158
                     $this->assertStringContainsStrings(
Please login to merge, or discard this patch.