Passed
Push — master ( 46e361...6daab3 )
by Bruno
09:42
created
Modelarium/Laravel/Targets/MigrationGenerator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
             $name = $directive->name->value;
293 293
             switch ($name) {
294 294
             case 'migrationSoftDeletes':
295
-                $this->createCode[] ='$table->softDeletes();';
295
+                $this->createCode[] = '$table->softDeletes();';
296 296
                 break;
297 297
             case 'migrationPrimaryIndex':
298 298
                 // TODO
@@ -307,10 +307,10 @@  discard block
 block discarded – undo
307 307
                 if (!count($indexFields)) {
308 308
                     throw new Exception("You must provide at least one field to an index");
309 309
                 }
310
-                $this->createCode[] ='$table->index("' . implode('", "', $indexFields) .'");';
310
+                $this->createCode[] = '$table->index("' . implode('", "', $indexFields) . '");';
311 311
                 break;
312 312
             case 'migrationSpatialIndex':
313
-                $this->createCode[] ='$table->spatialIndex("' . $directive->arguments[0]->value->value .'");';
313
+                $this->createCode[] = '$table->spatialIndex("' . $directive->arguments[0]->value->value . '");';
314 314
                 break;
315 315
 
316 316
             case 'migrationFulltextIndex':
@@ -331,10 +331,10 @@  discard block
 block discarded – undo
331 331
                     "\")');";
332 332
                 break;
333 333
             case 'migrationRememberToken':
334
-                $this->createCode[] ='$table->rememberToken();';
334
+                $this->createCode[] = '$table->rememberToken();';
335 335
                 break;
336 336
             case 'migrationTimestamps':
337
-                $this->createCode[] ='$table->timestamps();';
337
+                $this->createCode[] = '$table->timestamps();';
338 338
                 break;
339 339
             default:
340 340
             }
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 
344 344
     public function generateString(): string
345 345
     {
346
-        return $this->stubToString('migration', function ($stub) {
346
+        return $this->stubToString('migration', function($stub) {
347 347
             foreach ($this->type->getFields() as $field) {
348 348
                 $directives = $field->astNode->directives;
349 349
                 if (
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
 
416 416
     public function generateManyToManyTable(string $type1, string $type2): GeneratedItem
417 417
     {
418
-        $contents = $this->stubToString('migration', function ($stub) use ($type1, $type2) {
418
+        $contents = $this->stubToString('migration', function($stub) use ($type1, $type2) {
419 419
             $code = <<<EOF
420 420
 
421 421
             \$table->increments("id");
Please login to merge, or discard this patch.
Modelarium/Laravel/ServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
         Event::listen(
30 30
             RegisterDirectiveNamespaces::class,
31
-            function (RegisterDirectiveNamespaces $registerDirectiveNamespaces): string {
31
+            function(RegisterDirectiveNamespaces $registerDirectiveNamespaces): string {
32 32
                 return 'Modelarium\\Laravel\\Lighthouse\\Directives';
33 33
             }
34 34
         );
Please login to merge, or discard this patch.
Modelarium/Laravel/Processor.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * @param  string[]  $directiveNamespaces
69 69
      * @return array<string, string>
70 70
      */
71
-    public static function getDirectivesGraphql($directiveNamespaces = [ __DIR__ . 'Lighthouse/Directives' ]): array
71
+    public static function getDirectivesGraphql($directiveNamespaces = [__DIR__ . 'Lighthouse/Directives']): array
72 72
     {
73 73
         $directives = [];
74 74
 
@@ -78,11 +78,11 @@  discard block
 block discarded – undo
78 78
 
79 79
             foreach ($classesInNamespace as $class) {
80 80
                 $reflection = new \ReflectionClass($class);
81
-                if (! $reflection->isInstantiable()) {
81
+                if (!$reflection->isInstantiable()) {
82 82
                     continue;
83 83
                 }
84 84
 
85
-                if (! is_a($class, Directive::class, true)) {
85
+                if (!is_a($class, Directive::class, true)) {
86 86
                     continue;
87 87
                 }
88 88
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      * @param  string[]  $directiveNamespaces
101 101
      * @return string
102 102
      */
103
-    public static function getDirectivesGraphqlString($directiveNamespaces = [ __DIR__ . 'Lighthouse/Directives' ]): string
103
+    public static function getDirectivesGraphqlString($directiveNamespaces = [__DIR__ . 'Lighthouse/Directives']): string
104 104
     {
105 105
         return implode(self::getDirectivesGraphql($directiveNamespaces));
106 106
     }
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                 if ($name === 'Mutation') {
161 161
                     continue;
162 162
                 }
163
-                $g = $this->processType((string)$name, $object);
163
+                $g = $this->processType((string) $name, $object);
164 164
                 $this->collection = $this->collection->merge($g);
165 165
             }
166 166
         }
Please login to merge, or discard this patch.