Passed
Push — master ( 4c99b3...1b0c60 )
by Bruno
02:54
created
Modelarium/Laravel/Directives/CanDirective.php 1 patch
Switch Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -105,24 +105,24 @@
 block discarded – undo
105 105
         
106 106
         foreach ($directive->arguments as $arg) {
107 107
             switch ($arg->name->value) {
108
-                case 'ability':
109
-                    // @phpstan-ignore-next-line
110
-                    $ability = $arg->value->value;
111
-                break;
112
-                case 'find':
113
-                    // @phpstan-ignore-next-line
114
-                    $find = $arg->value->value;
115
-                break;
116
-                case 'model':
117
-                    // @phpstan-ignore-next-line
118
-                    $model = $arg->value->value;
119
-                break;
120
-                case 'injectArgs':
121
-                    $injected = true;
122
-                break;
123
-                case 'args':
124
-                    $args = true;
125
-                break;
108
+            case 'ability':
109
+                // @phpstan-ignore-next-line
110
+                $ability = $arg->value->value;
111
+            break;
112
+            case 'find':
113
+                // @phpstan-ignore-next-line
114
+                $find = $arg->value->value;
115
+            break;
116
+            case 'model':
117
+                // @phpstan-ignore-next-line
118
+                $model = $arg->value->value;
119
+            break;
120
+            case 'injectArgs':
121
+                $injected = true;
122
+            break;
123
+            case 'args':
124
+                $args = true;
125
+            break;
126 126
             }
127 127
         }
128 128
 
Please login to merge, or discard this patch.
Modelarium/Laravel/Directives/MigrationIndexDirective.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         if (!count($indexFields)) {
25 25
             throw new Exception("You must provide at least one field to an index");
26 26
         }
27
-        $generator->createCode[] ='$table->index("' . implode('", "', $indexFields) .'");';
27
+        $generator->createCode[] = '$table->index("' . implode('", "', $indexFields) . '");';
28 28
     }
29 29
 
30 30
     public static function processMigrationFieldDirective(
Please login to merge, or discard this patch.
Modelarium/Laravel/Directives/MigrationSoftDeletesDirective.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
         MigrationGenerator $generator,
15 15
         \GraphQL\Language\AST\DirectiveNode $directive
16 16
     ): void {
17
-        $generator->createCode[] ='$table->softDeletes();';
17
+        $generator->createCode[] = '$table->softDeletes();';
18 18
     }
19 19
 
20 20
     public static function processMigrationFieldDirective(
Please login to merge, or discard this patch.
Modelarium/Laravel/Directives/ModelExtendsDirective.php 1 patch
Switch Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@
 block discarded – undo
26 26
             $value = $arg->value->value;
27 27
 
28 28
             switch ($arg->name->value) {
29
-                case 'class':
30
-                    $generator->parentClassName = $value;
31
-                break;
29
+            case 'class':
30
+                $generator->parentClassName = $value;
31
+            break;
32 32
             }
33 33
         }
34 34
     }
Please login to merge, or discard this patch.
Modelarium/Laravel/Directives/MigrationTimestampsDirective.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
         MigrationGenerator $generator,
15 15
         \GraphQL\Language\AST\DirectiveNode $directive
16 16
     ): void {
17
-        $generator->createCode[] ='$table->timestamps();';
17
+        $generator->createCode[] = '$table->timestamps();';
18 18
     }
19 19
 
20 20
     public static function processMigrationFieldDirective(
Please login to merge, or discard this patch.
Modelarium/Laravel/Directives/MigrationSpatialIndexDirective.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
         \GraphQL\Language\AST\DirectiveNode $directive
16 16
     ): void {
17 17
         /** @phpstan-ignore-next-line */
18
-        $generator->createCode[] = '$table->spatialIndex("' . $directive->arguments[0]->value->value .'");';
18
+        $generator->createCode[] = '$table->spatialIndex("' . $directive->arguments[0]->value->value . '");';
19 19
     }
20 20
 
21 21
     public static function processMigrationFieldDirective(
Please login to merge, or discard this patch.
Modelarium/Laravel/Targets/MigrationGenerator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                     'enum',
161 161
                     'App\\Datatypes',
162 162
                     'Tests\\Unit',
163
-                    function (ClassType $enumClass) use ($enumValues) {
163
+                    function(ClassType $enumClass) use ($enumValues) {
164 164
                         $enumClass->addConstant('CHOICES', $enumValues);
165 165
                         $enumClass->getMethod('__construct')->addBody('$this->choices = self::CHOICES;');
166 166
                     }
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
             $this->getBasePath(
465 465
                 'database/migrations/' .
466 466
                 date('Y_m_d_His') .
467
-                str_pad((string)(static::$counter++), 3, "0", STR_PAD_LEFT) . // so we keep the same order of types in schema
467
+                str_pad((string) (static::$counter++), 3, "0", STR_PAD_LEFT) . // so we keep the same order of types in schema
468 468
                 '_' . $this->mode . '_' .
469 469
                 $relation .
470 470
                 '_table.php'
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
             $this->getBasePath(
505 505
                 'database/migrations/' .
506 506
                 date('Y_m_d_His') .
507
-                str_pad((string)(static::$counter++), 3, "0", STR_PAD_LEFT) . // so we keep the same order of types in schema
507
+                str_pad((string) (static::$counter++), 3, "0", STR_PAD_LEFT) . // so we keep the same order of types in schema
508 508
                 '_' . $this->mode . '_' .
509 509
                 $type1 . '_' . $type2 .
510 510
                 '_table.php'
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
         return $this->getBasePath(
550 550
             'database/migrations/' .
551 551
             date('Y_m_d_His') .
552
-            str_pad((string)(static::$counter++), 3, "0", STR_PAD_LEFT) . // so we keep the same order of types in schema
552
+            str_pad((string) (static::$counter++), 3, "0", STR_PAD_LEFT) . // so we keep the same order of types in schema
553 553
             '_' . $this->mode . '_' .
554 554
             $basename . '_table.php'
555 555
         );
Please login to merge, or discard this patch.
Modelarium/Laravel/Directives/LaravelMediaLibraryDataDirective.php 2 patches
Switch Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -43,16 +43,16 @@
 block discarded – undo
43 43
              */
44 44
 
45 45
             switch ($arg->name->value) {
46
-                case 'collection':
47
-                    /** @phpstan-ignore-next-line */
48
-                    $collection = $arg->value->value;
49
-                break;
50
-                case 'fields':
51
-                    /** @phpstan-ignore-next-line */
52
-                    foreach ($arg->value->values as $item) {
53
-                        $customFields[] = $item->value;
54
-                    }
55
-                break;
46
+            case 'collection':
47
+                /** @phpstan-ignore-next-line */
48
+                $collection = $arg->value->value;
49
+            break;
50
+            case 'fields':
51
+                /** @phpstan-ignore-next-line */
52
+                foreach ($arg->value->values as $item) {
53
+                    $customFields[] = $item->value;
54
+                }
55
+            break;
56 56
                 }
57 57
         }
58 58
         $studlyCollection = Str::studly($collection);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
                 ->setPublic()
87 87
                 ->setReturnType('string')
88 88
                 ->addComment("Returns the media attribute (url) for the $collection")
89
-                ->setBody( /** @lang PHP */
89
+                ->setBody(/** @lang PHP */
90 90
                     <<< PHP
91 91
     \$image = \$generator->getMedia{$studlyCollection}Collection()->first();
92 92
     if (\$image) {
Please login to merge, or discard this patch.