Passed
Push — master ( 423ab1...c488c7 )
by Bruno
06:36
created
Modelarium/Laravel/Targets/SeedGenerator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
     public function generate(): GeneratedCollection
11 11
     {
12 12
         return new GeneratedCollection(
13
-            [ new GeneratedItem(
13
+            [new GeneratedItem(
14 14
                 GeneratedItem::TYPE_SEED,
15 15
                 $this->generateString(),
16 16
                 $this->getGenerateFilename()
@@ -25,6 +25,6 @@  discard block
 block discarded – undo
25 25
 
26 26
     public function getGenerateFilename(): string
27 27
     {
28
-        return $this->getBasePath('database/seeds/'. $this->studlyName . 'Seeder.php');
28
+        return $this->getBasePath('database/seeds/' . $this->studlyName . 'Seeder.php');
29 29
     }
30 30
 }
Please login to merge, or discard this patch.
Modelarium/GeneratedCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
     public function filterByType(string $type): GeneratedCollection
10 10
     {
11 11
         return $this->filter(
12
-            function ($i) use ($type) {
12
+            function($i) use ($type) {
13 13
                 return $i->type == $type;
14 14
             }
15 15
         );
Please login to merge, or discard this patch.
Modelarium/Laravel/Targets/FactoryGenerator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
     public function generate(): GeneratedCollection
11 11
     {
12 12
         return new GeneratedCollection(
13
-            [ new GeneratedItem(
13
+            [new GeneratedItem(
14 14
                 GeneratedItem::TYPE_FACTORY,
15 15
                 $this->generateString(),
16 16
                 $this->getGenerateFilename()
@@ -25,6 +25,6 @@  discard block
 block discarded – undo
25 25
 
26 26
     public function getGenerateFilename(): string
27 27
     {
28
-        return $this->getBasePath('database/factories/'. $this->studlyName . 'Factory.php');
28
+        return $this->getBasePath('database/factories/' . $this->studlyName . 'Factory.php');
29 29
     }
30 30
 }
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/Parser.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     {
160 160
         $originalTypeLoader = $this->schema->getConfig()->typeLoader;
161 161
 
162
-        $this->schema->getConfig()->typeLoader = function ($typeName) use ($originalTypeLoader) {
162
+        $this->schema->getConfig()->typeLoader = function($typeName) use ($originalTypeLoader) {
163 163
             $type = $originalTypeLoader($typeName);
164 164
             if ($type instanceof \GraphQL\Type\Definition\CustomScalarType) {
165 165
                 $scalarName = $type->name;
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
     {
175 175
         $this->ast = Visitor::visit($this->ast, [
176 176
             // load the scalar type classes
177
-            NodeKind::SCALAR_TYPE_DEFINITION => function ($node) {
177
+            NodeKind::SCALAR_TYPE_DEFINITION => function($node) {
178 178
                 $scalarName = $node->name->value;
179 179
 
180 180
                 // load classes
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
             return [];
238 238
         }
239 239
         return array_map(
240
-            function ($i) use ($basedir) {
240
+            function($i) use ($basedir) {
241 241
                 $name = $i[1];
242 242
                 if (array_key_exists($name, $this->imports)) {
243 243
                     return $this->imports[$name];
Please login to merge, or discard this patch.
Modelarium/Laravel/Targets/PolicyGenerator.php 2 patches
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,6 +168,6 @@
 block discarded – undo
168 168
 
169 169
     public function getGenerateFilename(string $name): string
170 170
     {
171
-        return $this->getBasePath('app/Policies/'. Str::studly($name) . 'Policy.php');
171
+        return $this->getBasePath('app/Policies/' . Str::studly($name) . 'Policy.php');
172 172
     }
173 173
 }
Please login to merge, or discard this patch.
Modelarium/Laravel/Console/Commands/ModelariumScaffoldCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
         $this->writeFiles(
113 113
             $processor->getCollection(),
114 114
             base_path(),
115
-            (bool)$this->option('overwrite')
115
+            (bool) $this->option('overwrite')
116 116
         );
117 117
         $this->info('Finished scaffolding. You might want to run `composer dump-autoload`');
118 118
     }
Please login to merge, or discard this patch.
Modelarium/Laravel/Console/Commands/ModelariumFrontendCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 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
 
Please login to merge, or discard this patch.
Modelarium/FormulariumUtils.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
                     throw new Exception("Directive $validator does not have argument $argName");
107 107
                 }
108 108
                 if ($argValidator->type === 'Int') {
109
-                    $argValue = (int)$argValue;
109
+                    $argValue = (int) $argValue;
110 110
                 }
111 111
                 $arguments[$argName] = $argValue;
112 112
             }
Please login to merge, or discard this patch.