Passed
Push — master ( 625be7...d965a1 )
by Bruno
08:58
created
Modelarium/Laravel/Targets/PolicyGenerator.php 2 patches
Switch Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -65,24 +65,24 @@
 block discarded – undo
65 65
         $model = $field->type->name; /** @phpstan-ignore-line */;
66 66
         foreach ($directive->arguments as $arg) {
67 67
             switch ($arg->name->value) {
68
-                case 'ability':
69
-                    // @phpstan-ignore-next-line
70
-                    $ability = $arg->value->value;
71
-                break;
72
-                case 'find':
73
-                    // @phpstan-ignore-next-line
74
-                    $find = $arg->value->value;
75
-                break;
76
-                case 'model':
77
-                    // @phpstan-ignore-next-line
78
-                    $model = $arg->value->value;
79
-                break;
80
-                case 'injectArgs':
81
-                    $injected = ', array $injectedArgs';
82
-                break;
83
-                case 'args':
84
-                    $args = ', array $staticArgs';
85
-                break;
68
+            case 'ability':
69
+                // @phpstan-ignore-next-line
70
+                $ability = $arg->value->value;
71
+            break;
72
+            case 'find':
73
+                // @phpstan-ignore-next-line
74
+                $find = $arg->value->value;
75
+            break;
76
+            case 'model':
77
+                // @phpstan-ignore-next-line
78
+                $model = $arg->value->value;
79
+            break;
80
+            case 'injectArgs':
81
+                $injected = ', array $injectedArgs';
82
+            break;
83
+            case 'args':
84
+                $args = ', array $staticArgs';
85
+            break;
86 86
             }
87 87
         }
88 88
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     public function generate(): GeneratedCollection
31 31
     {
32 32
         return new GeneratedCollection(
33
-            [ new GeneratedItem(
33
+            [new GeneratedItem(
34 34
                 GeneratedItem::TYPE_POLICY,
35 35
                 $this->generateString(),
36 36
                 $this->getGenerateFilename()
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 
146 146
     public function generateString(): string
147 147
     {
148
-        return $this->stubToString('policy', function ($stub) {
148
+        return $this->stubToString('policy', function($stub) {
149 149
             foreach ($this->type->getFields() as $field) {
150 150
                 $directives = $field->astNode->directives;
151 151
                 $this->processDirectives($field, $directives);
@@ -168,6 +168,6 @@  discard block
 block discarded – undo
168 168
 
169 169
     public function getGenerateFilename(): string
170 170
     {
171
-        return $this->getBasePath('app/Policies/'. $this->studlyName . 'Policy.php');
171
+        return $this->getBasePath('app/Policies/' . $this->studlyName . 'Policy.php');
172 172
     }
173 173
 }
Please login to merge, or discard this patch.
Modelarium/Laravel/Targets/EventGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     {
35 35
         return new GeneratedItem(
36 36
             $name,
37
-            $this->stubToString('event', function ($stub) use ($name, $type) {
37
+            $this->stubToString('event', function($stub) use ($name, $type) {
38 38
                 $eventTokens = explode('\\', $name);
39 39
                 $eventClassName = array_pop($eventTokens);
40 40
                 $eventNamespace = implode('\\', $eventTokens);
Please login to merge, or discard this patch.
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/Console/Commands/ModelariumCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
             $processor->getCollection(),
110 110
             // @phpstan-ignore-next-line
111 111
             base_path(),
112
-            (bool)$this->option('overwrite')
112
+            (bool) $this->option('overwrite')
113 113
         );
114 114
 
115 115
         $this->info('Finished. You might want to run `composer dump-autoload`');
Please login to merge, or discard this patch.
Modelarium/Laravel/Targets/ModelGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@
 block discarded – undo
168 168
 
169 169
     public function generateString(): string
170 170
     {
171
-        return $this->stubToString('modelbase', function ($stub) {
171
+        return $this->stubToString('modelbase', function($stub) {
172 172
             $db = [];
173 173
 
174 174
             foreach ($this->type->getFields() as $field) {
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/Processor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
                 if ($name === 'Mutation') {
116 116
                     continue;
117 117
                 }
118
-                $g = $this->processType((string)$name, $object);
118
+                $g = $this->processType((string) $name, $object);
119 119
                 $this->collection = $this->collection->merge($g);
120 120
             }
121 121
         }
Please login to merge, or discard this patch.
Modelarium/Parser.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     {
105 105
         $originalTypeLoader = $this->schema->getConfig()->typeLoader;
106 106
 
107
-        $this->schema->getConfig()->typeLoader = function ($typeName) use ($originalTypeLoader) {
107
+        $this->schema->getConfig()->typeLoader = function($typeName) use ($originalTypeLoader) {
108 108
             $type = $originalTypeLoader($typeName);
109 109
             if ($type instanceof \GraphQL\Type\Definition\CustomScalarType) {
110 110
                 $scalarName = $type->name;
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     {
120 120
         $this->ast = Visitor::visit($this->ast, [
121 121
             // load the scalar type classes
122
-            NodeKind::SCALAR_TYPE_DEFINITION => function ($node) {
122
+            NodeKind::SCALAR_TYPE_DEFINITION => function($node) {
123 123
                 $scalarName = $node->name->value;
124 124
 
125 125
                 // load classes
@@ -165,13 +165,13 @@  discard block
 block discarded – undo
165 165
                 //   any value: replace this node with the returned value
166 166
                 return null;
167 167
             },
168
-            NodeKind::NAMED_TYPE  => function ($node) {
168
+            NodeKind::NAMED_TYPE  => function($node) {
169 169
                 return null;
170 170
             },
171
-            NodeKind::OBJECT_TYPE_DEFINITION  => function ($node) {
171
+            NodeKind::OBJECT_TYPE_DEFINITION  => function($node) {
172 172
                 return null;
173 173
             },
174
-            'enter' => function ($node) {
174
+            'enter' => function($node) {
175 175
                 return null;
176 176
             }
177 177
         ]);
Please login to merge, or discard this patch.