Passed
Push — master ( 96b623...625be7 )
by Bruno
10:17 queued 04:06
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/MigrationGenerator.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -240,10 +240,10 @@  discard block
 block discarded – undo
240 240
                 foreach ($values as $value) {
241 241
                     $indexFields[] = $value->value;
242 242
                 }
243
-                $db[] = '$table->index("' . implode('", "', $indexFields) .'");';
243
+                $db[] = '$table->index("' . implode('", "', $indexFields) . '");';
244 244
                 break;
245 245
             case 'spatialIndex':
246
-                $db[] = '$table->spatialIndex("' . $directive->arguments[0]->value->value .'");';
246
+                $db[] = '$table->spatialIndex("' . $directive->arguments[0]->value->value . '");';
247 247
                 break;
248 248
             case 'rememberToken':
249 249
                 $db[] = '$table->rememberToken();';
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 
261 261
     public function generateString(): string
262 262
     {
263
-        return $this->stubToString('migration', function ($stub) {
263
+        return $this->stubToString('migration', function($stub) {
264 264
             $db = [];
265 265
 
266 266
             foreach ($this->type->getFields() as $field) {
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
 
311 311
     public function generateManyToManyTable(string $type1, string $type2): GeneratedItem
312 312
     {
313
-        $contents = $this->stubToString('migration', function ($stub) use ($type1, $type2) {
313
+        $contents = $this->stubToString('migration', function($stub) use ($type1, $type2) {
314 314
             $code = <<<EOF
315 315
 
316 316
             \$table->increments("id");
@@ -352,6 +352,6 @@  discard block
 block discarded – undo
352 352
     {
353 353
         // TODO: check if a migration '_create_'. $this->lowerName exists, generate a diff from model(), generate new migration with diff
354 354
   
355
-        return $this->getBasePath('database/migrations/' . date('Y_m_d_His') . '_create_'. $basename . '_table.php');
355
+        return $this->getBasePath('database/migrations/' . date('Y_m_d_His') . '_create_' . $basename . '_table.php');
356 356
     }
357 357
 }
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.