Passed
Push — master ( d148de...2e74be )
by Bruno
09:35
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.