Passed
Push — master ( 41a7c0...823f6c )
by Bruno
15:50 queued 07:18
created
Modelarium/Laravel/Targets/MigrationGenerator.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
             $name = $directive->name->value;
307 307
             switch ($name) {
308 308
             case 'migrationSoftDeletes':
309
-                $this->createCode[] ='$table->softDeletes();';
309
+                $this->createCode[] = '$table->softDeletes();';
310 310
                 break;
311 311
             case 'migrationPrimaryIndex':
312 312
                 // TODO
@@ -321,10 +321,10 @@  discard block
 block discarded – undo
321 321
                 if (!count($indexFields)) {
322 322
                     throw new Exception("You must provide at least one field to an index");
323 323
                 }
324
-                $this->createCode[] ='$table->index("' . implode('", "', $indexFields) .'");';
324
+                $this->createCode[] = '$table->index("' . implode('", "', $indexFields) . '");';
325 325
                 break;
326 326
             case 'migrationSpatialIndex':
327
-                $this->createCode[] ='$table->spatialIndex("' . $directive->arguments[0]->value->value .'");';
327
+                $this->createCode[] = '$table->spatialIndex("' . $directive->arguments[0]->value->value . '");';
328 328
                 break;
329 329
 
330 330
             case 'migrationFulltextIndex':
@@ -345,10 +345,10 @@  discard block
 block discarded – undo
345 345
                     "\")');";
346 346
                 break;
347 347
             case 'migrationRememberToken':
348
-                $this->createCode[] ='$table->rememberToken();';
348
+                $this->createCode[] = '$table->rememberToken();';
349 349
                 break;
350 350
             case 'migrationTimestamps':
351
-                $this->createCode[] ='$table->timestamps();';
351
+                $this->createCode[] = '$table->timestamps();';
352 352
                 break;
353 353
             default:
354 354
             }
Please login to merge, or discard this patch.
Modelarium/Laravel/Targets/ModelGenerator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
                 break;
284 284
 
285 285
             case 'morphedByMany':
286
-                $relationship = 'NN';// TODO Datatype_relationship::RELATIONSHIP_MANY_TO_MANY; // TODO
286
+                $relationship = 'NN'; // TODO Datatype_relationship::RELATIONSHIP_MANY_TO_MANY; // TODO
287 287
                 $typeMap = $this->parser->getSchema()->getTypeMap();
288 288
        
289 289
                 foreach ($typeMap as $name => $object) {
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
                      * @var ObjectType $object
296 296
                      */
297 297
 
298
-                    if (str_starts_with((string)$name, '__')) {
298
+                    if (str_starts_with((string) $name, '__')) {
299 299
                         // internal type
300 300
                         continue;
301 301
                     }
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
                             continue;
308 308
                         }
309 309
 
310
-                        $methodName = $this->getInflector()->pluralize(mb_strtolower((string)$name));
310
+                        $methodName = $this->getInflector()->pluralize(mb_strtolower((string) $name));
311 311
                         $this->class->addMethod($methodName)
312 312
                                 ->setReturnType('\\Illuminate\\Database\\Eloquent\\Relations\\MorphToMany')
313 313
                                 ->setPublic()
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
         if ($generateRandom) {
332 332
             $this->methodRandom->addBody(
333 333
                 '$data["' . $lowerName . '_id"] = function () {' . "\n" .
334
-                '    return factory(' . $targetClass . '::class)->create()->id;'  . "\n" .
334
+                '    return factory(' . $targetClass . '::class)->create()->id;' . "\n" .
335 335
                 '};'
336 336
             );
337 337
         }
Please login to merge, or discard this patch.
Modelarium/Laravel/Console/Commands/ModelariumFrontendCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         $writtenFiles = $this->writeFiles(
82 82
             $collection,
83 83
             $basepath,
84
-            (bool)$this->option('overwrite')
84
+            (bool) $this->option('overwrite')
85 85
         );
86 86
         $this->info('Files generated.');
87 87
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             // this runs all prettier commands in parallel.
98 98
             $run = array_reduce(
99 99
                 $writtenFiles,
100
-                function ($carry, $f) use ($command) {
100
+                function($carry, $f) use ($command) {
101 101
                     return $carry . '(' . $command . $f . ') & ';
102 102
                 }
103 103
             );
Please login to merge, or discard this patch.
Modelarium/Laravel/Console/Commands/ModelariumTypeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
         $target = base_path('graphql/data/' . $this->lowerName . '.graphql');
70 70
         $this->writeFile(
71 71
             $target,
72
-            (bool)$this->option('overwrite'),
72
+            (bool) $this->option('overwrite'),
73 73
             $graphql
74 74
         );
75 75
         $this->info('Type generated at ' . $target);
Please login to merge, or discard this patch.
Modelarium/Frontend/FrontendGenerator.php 1 patch
Spacing   +13 added lines, -13 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
 
@@ -121,12 +121,12 @@  discard block
 block discarded – undo
121 121
     protected function buildTemplateParameters(): void
122 122
     {
123 123
         $this->cardFields = $this->model->filterField(
124
-            function (Field $field) {
124
+            function(Field $field) {
125 125
                 return $field->getRenderable('card', false);
126 126
             }
127 127
         );
128 128
         $this->tableFields = $this->model->filterField(
129
-            function (Field $field) {
129
+            function(Field $field) {
130 130
                 return $field->getRenderable('table', false);
131 131
             }
132 132
         );
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
             'Table',
154 154
             [
155 155
                 Table::ROW_NAMES => array_map(
156
-                    function (Field $field) {
156
+                    function(Field $field) {
157 157
                         return $field->getRenderable(Renderable::LABEL, $field->getName());
158 158
                     },
159 159
                     $this->tableFields
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
             true
171 171
         );
172 172
         $titleFields = $this->model->filterField(
173
-            function (Field $field) {
173
+            function(Field $field) {
174 174
                 return $field->getRenderable('title', false);
175 175
             }
176 176
         );
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
             ),
186 186
             'buttonCreate' => $buttonCreate,
187 187
             'tablelist' => $table->getRenderHTML(),
188
-            'tableItemFields' => array_keys(array_map(function (Field $f) {
188
+            'tableItemFields' => array_keys(array_map(function(Field $f) {
189 189
                 return $f->getName();
190 190
             }, $this->tableFields)),
191 191
             'titleField' => array_key_first($titleFields) ?: 'id'
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 
214 214
         if ($mode == 'editable') {
215 215
             $vue->setEditableTemplate(
216
-                function (FrameworkVue $vue, array $data, Model $m) use ($stub) {
216
+                function(FrameworkVue $vue, array $data, Model $m) use ($stub) {
217 217
                     return $this->templateCallback($stub, $vue, $data, $m);
218 218
                 }
219 219
             );
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             );
228 228
         } else {
229 229
             $vue->setViewableTemplate(
230
-                function (FrameworkVue $vue, array $data, Model $m) use ($stub) {
230
+                function(FrameworkVue $vue, array $data, Model $m) use ($stub) {
231 231
                     return $this->templateCallback($stub, $vue, $data, $m);
232 232
                 }
233 233
             );
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
          * card
255 255
          */
256 256
         $cardFieldNames = array_map(
257
-            function (Field $field) {
257
+            function(Field $field) {
258 258
                 return $field->getName();
259 259
             },
260 260
             $this->cardFields
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
          * table
291 291
          */
292 292
         $tableFieldNames = array_map(
293
-            function (Field $field) {
293
+            function(Field $field) {
294 294
                 return $field->getName();
295 295
             },
296 296
             $this->tableFields
@@ -373,14 +373,14 @@  discard block
 block discarded – undo
373 373
         ];
374 374
 
375 375
         $import = array_map(
376
-            function ($i) use ($name) {
376
+            function($i) use ($name) {
377 377
                 return "import {$name}$i from './{$name}$i.vue';";
378 378
             },
379 379
             $items
380 380
         );
381 381
 
382 382
         $export = array_map(
383
-            function ($i) use ($name) {
383
+            function($i) use ($name) {
384 384
                 return "    {$name}$i,\n";
385 385
             },
386 386
             $items
Please login to merge, or discard this patch.