Passed
Push — master ( 1c0242...3e6a4b )
by Bruno
10:24
created
Modelarium/Laravel/Datatypes/Datatype_relationship.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
          */
56 56
         $formulariumModel = call_user_func("$model::getFormularium");
57 57
         $graphqlQuery = $formulariumModel->mapFields(
58
-            function (Field $f) {
58
+            function(Field $f) {
59 59
                 return \Modelarium\Frontend\Util::fieldShow($f) ? $f->toGraphqlQuery([self::RECURSE => false]) : null;
60 60
             }
61 61
         );
Please login to merge, or discard this patch.
Modelarium/Frontend/FrontendGenerator.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -86,10 +86,10 @@  discard block
 block discarded – undo
86 86
         // $blade = FrameworkComposer::getByName('Blade');
87 87
 
88 88
         if ($vue !== null) {
89
-            $cardFieldNames = array_map(function (Field $f) {
89
+            $cardFieldNames = array_map(function(Field $f) {
90 90
                 return $f->getName();
91 91
             }, $this->cardFields);
92
-            $tableFieldNames = array_map(function (Field $f) {
92
+            $tableFieldNames = array_map(function(Field $f) {
93 93
                 return $f->getName();
94 94
             }, $this->tableFields);
95 95
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
                 $vue,
115 115
                 'Form',
116 116
                 'editable',
117
-                function (Field $f) {
117
+                function(Field $f) {
118 118
                     if (!$f->getExtradata('modelFillable')) {
119 119
                         return false;
120 120
                     }
@@ -177,12 +177,12 @@  discard block
 block discarded – undo
177 177
     protected function buildTemplateParameters(): void
178 178
     {
179 179
         $this->cardFields = $this->model->filterField(
180
-            function (Field $field) {
180
+            function(Field $field) {
181 181
                 return $field->getRenderable('card', false);
182 182
             }
183 183
         );
184 184
         $this->tableFields = $this->model->filterField(
185
-            function (Field $field) {
185
+            function(Field $field) {
186 186
                 return $field->getRenderable('table', false);
187 187
             }
188 188
         );
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
             'Button',
195 195
             [
196 196
                 Button::TYPE => 'a',
197
-                Button::ATTRIBUTES => ['href' => "/{$this->lowerName}/edit" ],
197
+                Button::ATTRIBUTES => ['href' => "/{$this->lowerName}/edit"],
198 198
             ]
199 199
         )->setContent(
200 200
             '<i class="fa fa-plus"></i> Add new',
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
             'Table',
238 238
             [
239 239
                 Table::ROW_NAMES => array_map(
240
-                    function (Field $field) {
240
+                    function(Field $field) {
241 241
                         return $field->getRenderable(Renderable::LABEL, $field->getName());
242 242
                     },
243 243
                     $this->tableFields
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
             true
256 256
         );
257 257
         $titleFields = $this->model->filterField(
258
-            function (Field $field) {
258
+            function(Field $field) {
259 259
                 return $field->getRenderable('title', false);
260 260
             }
261 261
         );
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
             // TODO 'hasCan' => $this->model
280 280
             'spinner' => $spinner,
281 281
             'tablelist' => $table->getRenderHTML(),
282
-            'tableItemFields' => array_keys(array_map(function (Field $f) {
282
+            'tableItemFields' => array_keys(array_map(function(Field $f) {
283 283
                 return $f->getName();
284 284
             }, $this->tableFields)),
285 285
             'titleField' => array_key_first($titleFields) ?: 'id'
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 
315 315
         if ($mode == 'editable') {
316 316
             $vue->setEditableTemplate(
317
-                function (FrameworkVue $vue, array $data, Model $m) use ($stub) {
317
+                function(FrameworkVue $vue, array $data, Model $m) use ($stub) {
318 318
                     return $this->templateCallback($stub, $vue, $data, $m);
319 319
                 }
320 320
             );
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
             );
329 329
         } else {
330 330
             $vue->setViewableTemplate(
331
-                function (FrameworkVue $vue, array $data, Model $m) use ($stub) {
331
+                function(FrameworkVue $vue, array $data, Model $m) use ($stub) {
332 332
                     return $this->templateCallback($stub, $vue, $data, $m);
333 333
                 }
334 334
             );
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
          * card
356 356
          */
357 357
         $cardFieldNames = array_map(
358
-            function (Field $field) {
358
+            function(Field $field) {
359 359
                 return $field->getName();
360 360
             },
361 361
             $this->cardFields
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
          * table
392 392
          */
393 393
         $tableFieldNames = array_map(
394
-            function (Field $field) {
394
+            function(Field $field) {
395 395
                 return $field->getName();
396 396
             },
397 397
             $this->tableFields
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
          * item
428 428
          */
429 429
         $graphqlQuery = $this->model->mapFields(
430
-            function (Field $f) {
430
+            function(Field $f) {
431 431
                 return \Modelarium\Frontend\Util::fieldShow($f) ? $f->toGraphqlQuery() : null;
432 432
             }
433 433
         );
@@ -496,14 +496,14 @@  discard block
 block discarded – undo
496 496
         ];
497 497
 
498 498
         $import = array_map(
499
-            function ($i) use ($name) {
499
+            function($i) use ($name) {
500 500
                 return "import {$name}$i from './{$name}$i.vue';";
501 501
             },
502 502
             $items
503 503
         );
504 504
 
505 505
         $export = array_map(
506
-            function ($i) use ($name) {
506
+            function($i) use ($name) {
507 507
                 return "    {$name}$i,\n";
508 508
             },
509 509
             $items
Please login to merge, or discard this patch.