Passed
Push — master ( 0d4b06...5f77cd )
by Bruno
03:50
created
Modelarium/Laravel/Directives/MigrationForeignDirective.php 1 patch
Switch Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@
 block discarded – undo
41 41
             $name = $directive->name->value;
42 42
 
43 43
             switch ($name) {
44
-                case 'belongToMany':
45
-                case 'morphedByMany':
46
-                    throw new DirectiveException("Foreign keys cannot be used with many-to-many-relationships. Check field: " . $field->name);
44
+            case 'belongToMany':
45
+            case 'morphedByMany':
46
+                throw new DirectiveException("Foreign keys cannot be used with many-to-many-relationships. Check field: " . $field->name);
47 47
             }
48 48
         }
49 49
 
Please login to merge, or discard this patch.
Modelarium/Laravel/Directives/MigrationFulltextIndexDirective.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
         }
25 25
         $generator->postCreateCode[] =
26 26
             "if (!App::environment('testing')) {
27
-            DB::statement('ALTER TABLE " . $generator->getTableName()  .
27
+            DB::statement('ALTER TABLE " . $generator->getTableName() .
28 28
                 " ADD FULLTEXT fulltext_index (`" . implode('`, `', $indexFields) . "`)');
29 29
         }";
30 30
     }
Please login to merge, or discard this patch.
Modelarium/Laravel/Console/Commands/ModelariumFrontendCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -156,11 +156,11 @@  discard block
 block discarded – undo
156 156
         $writtenFiles = $this->writeFiles(
157 157
             $collection,
158 158
             $basepath,
159
-            function (GeneratedItem $i) use ($match) {
160
-                if ((bool)$this->option('overwrite') === true) {
159
+            function(GeneratedItem $i) use ($match) {
160
+                if ((bool) $this->option('overwrite') === true) {
161 161
                     return true;
162 162
                 }
163
-                if ((bool)$this->option('overwrite-graphql') === true) {
163
+                if ((bool) $this->option('overwrite-graphql') === true) {
164 164
                     if (
165 165
                         StringUtil::endsWith($i->filename, '.graphql')
166 166
                     ) {
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
             // this runs all prettier commands in parallel.
190 190
             $run = array_reduce(
191 191
                 $writtenFiles,
192
-                function ($carry, $f) use ($command) {
192
+                function($carry, $f) use ($command) {
193 193
                     return $carry . '(' . $command . $f . ') & ';
194 194
                 }
195 195
             );
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
             // this runs all prettier commands in parallel.
209 209
             $run = array_reduce(
210 210
                 $writtenFiles,
211
-                function ($carry, $f) use ($command) {
211
+                function($carry, $f) use ($command) {
212 212
                     return $carry . '(' . $command . $f . ') & ';
213 213
                 }
214 214
             );
Please login to merge, or discard this patch.
Modelarium/Util.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
      */
48 48
     public static function scalars(array $datatypes, string $ns): array
49 49
     {
50
-        $graphql = [ "# File automatically generated by Modelarium\n" ];
50
+        $graphql = ["# File automatically generated by Modelarium\n"];
51 51
 
52 52
         foreach ($datatypes as $name) {
53 53
             $typeName = Str::studly($name);
Please login to merge, or discard this patch.
Modelarium/Laravel/Directives/CanDirective.php 2 patches
Switch Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -34,24 +34,24 @@
 block discarded – undo
34 34
 
35 35
         foreach ($directive->arguments as $arg) {
36 36
             switch ($arg->name->value) {
37
-                case 'ability':
38
-                    // @phpstan-ignore-next-line
39
-                    $ability = (string)$arg->value->value;
40
-                break;
41
-                case 'find':
42
-                    // @phpstan-ignore-next-line
43
-                    $find = $arg->value->value;
44
-                break;
45
-                case 'model':
46
-                    // @phpstan-ignore-next-line
47
-                    $modelName = $arg->value->value;
48
-                break;
49
-                case 'injectArgs':
50
-                    $injected = true;
51
-                break;
52
-                case 'args':
53
-                    $args = true;
54
-                break;
37
+            case 'ability':
38
+                // @phpstan-ignore-next-line
39
+                $ability = (string)$arg->value->value;
40
+            break;
41
+            case 'find':
42
+                // @phpstan-ignore-next-line
43
+                $find = $arg->value->value;
44
+            break;
45
+            case 'model':
46
+                // @phpstan-ignore-next-line
47
+                $modelName = $arg->value->value;
48
+            break;
49
+            case 'injectArgs':
50
+                $injected = true;
51
+            break;
52
+            case 'args':
53
+                $args = true;
54
+            break;
55 55
             }
56 56
         }
57 57
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
             switch ($arg->name->value) {
37 37
                 case 'ability':
38 38
                     // @phpstan-ignore-next-line
39
-                    $ability = (string)$arg->value->value;
39
+                    $ability = (string) $arg->value->value;
40 40
                 break;
41 41
                 case 'find':
42 42
                     // @phpstan-ignore-next-line
Please login to merge, or discard this patch.
Modelarium/Laravel/Directives/ModelExtendsDirective.php 2 patches
Switch Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@
 block discarded – undo
20 20
             $value = $arg->value->value;
21 21
 
22 22
             switch ($arg->name->value) {
23
-                case 'class':
24
-                    $generator->parentClassName = (string)$value;
25
-                break;
23
+            case 'class':
24
+                $generator->parentClassName = (string)$value;
25
+            break;
26 26
             }
27 27
         }
28 28
     }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
             switch ($arg->name->value) {
23 23
                 case 'class':
24
-                    $generator->parentClassName = (string)$value;
24
+                    $generator->parentClassName = (string) $value;
25 25
                 break;
26 26
             }
27 27
         }
Please login to merge, or discard this patch.
Modelarium/Laravel/Processor.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      * @param  string[]  $directiveNamespaces
79 79
      * @return array<string, string>
80 80
      */
81
-    public static function getDirectivesGraphql($directiveNamespaces = [ 'Modelarium\Laravel\Lighthouse\Directives' ]): array
81
+    public static function getDirectivesGraphql($directiveNamespaces = ['Modelarium\Laravel\Lighthouse\Directives']): array
82 82
     {
83 83
         $directives = [];
84 84
 
@@ -88,15 +88,15 @@  discard block
 block discarded – undo
88 88
 
89 89
             foreach ($classesInNamespace as $class) {
90 90
                 $reflection = new \ReflectionClass($class);
91
-                if (! $reflection->isInstantiable()) {
91
+                if (!$reflection->isInstantiable()) {
92 92
                     continue;
93 93
                 }
94 94
 
95
-                if (! is_a($class, \Nuwave\Lighthouse\Schema\Directives\BaseDirective::class, true)) {
95
+                if (!is_a($class, \Nuwave\Lighthouse\Schema\Directives\BaseDirective::class, true)) {
96 96
                     continue;
97 97
                 }
98 98
                 
99
-                $name = \Nuwave\Lighthouse\Schema\DirectiveLocator::directiveName((string)$class);
99
+                $name = \Nuwave\Lighthouse\Schema\DirectiveLocator::directiveName((string) $class);
100 100
                 $directives[$name] = trim($class::definition());
101 101
             }
102 102
         }
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      * @param  string[]  $directiveNamespaces
111 111
      * @return string
112 112
      */
113
-    public static function getDirectivesGraphqlString($directiveNamespaces = [ 'Modelarium\\Laravel\\Lighthouse\\Directives' ]): string
113
+    public static function getDirectivesGraphqlString($directiveNamespaces = ['Modelarium\\Laravel\\Lighthouse\\Directives']): string
114 114
     {
115 115
         return implode("\n\n", self::getDirectivesGraphql($directiveNamespaces));
116 116
     }
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
                 if ($name === 'Query' || $name === 'Mutation' || $name === 'Subscription' || $name === 'Can') {
168 168
                     continue;
169 169
                 }
170
-                $g = $this->processType((string)$name, $object);
170
+                $g = $this->processType((string) $name, $object);
171 171
                 $this->collection = $this->collection->merge($g);
172 172
             }
173 173
         }
Please login to merge, or discard this patch.
Modelarium/Parser.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
     {
179 179
         $originalTypeLoader = $this->schema->getConfig()->typeLoader;
180 180
 
181
-        $this->schema->getConfig()->typeLoader = function ($typeName) use ($originalTypeLoader) {
181
+        $this->schema->getConfig()->typeLoader = function($typeName) use ($originalTypeLoader) {
182 182
             $type = $originalTypeLoader($typeName);
183 183
             if ($type instanceof \GraphQL\Type\Definition\CustomScalarType) {
184 184
                 $scalarName = $type->name;
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
     {
194 194
         $this->ast = Visitor::visit($this->ast, [
195 195
             // load the scalar type classes
196
-            NodeKind::SCALAR_TYPE_DEFINITION => function ($node) {
196
+            NodeKind::SCALAR_TYPE_DEFINITION => function($node) {
197 197
                 $scalarName = $node->name->value;
198 198
 
199 199
                 if (in_array($scalarName, ['BuilderValue', 'CanArgs', 'EnumValue', 'EqValue'])) {
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 
212 212
                             switch ($arg->name->value) {
213 213
                             case 'class':
214
-                                $className = (string)$value;
214
+                                $className = (string) $value;
215 215
                             break;
216 216
                             }
217 217
                         }
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
             return [];
258 258
         }
259 259
         return array_map(
260
-            function ($i) use ($basedir) {
260
+            function($i) use ($basedir) {
261 261
                 $name = $i[1];
262 262
                 if (array_key_exists($name, $this->imports)) {
263 263
                     return $this->imports[$name];
Please login to merge, or discard this patch.
LaravelEloquent/DatatypeGenerator/DatatypeGenerator_relationship.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
             ($field->getValidatorOption(Datatype::REQUIRED, 'value', false) ? '' : '->nullable()');
22 22
         // $index = '' $field->getRenderable('index')....
23 23
         return [
24
-          $id
24
+            $id
25 25
         ];
26 26
     }
27 27
 }
Please login to merge, or discard this patch.