Passed
Push — master ( da8729...ed7987 )
by Bruno
04:15
created
Modelarium/Laravel/Targets/FactoryGenerator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         }
32 32
         
33 33
         return new GeneratedCollection(
34
-            [ new GeneratedItem(
34
+            [new GeneratedItem(
35 35
                 GeneratedItem::TYPE_FACTORY,
36 36
                 $this->generateString(),
37 37
                 $this->getGenerateFilename()
@@ -50,6 +50,6 @@  discard block
 block discarded – undo
50 50
 
51 51
     public function getGenerateFilename(): string
52 52
     {
53
-        return $this->getBasePath('database/factories/'. $this->studlyName . 'Factory.php');
53
+        return $this->getBasePath('database/factories/' . $this->studlyName . 'Factory.php');
54 54
     }
55 55
 }
Please login to merge, or discard this patch.
util/CreateDirective.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         'implements' => implode(
23 23
             ', ',
24 24
             array_map(
25
-                function ($i) {
25
+                function($i) {
26 26
                     return Str::studly($i) . 'DirectiveInterface';
27 27
                 },
28 28
                 $processors
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 }
61 61
 
62 62
 // Script example.php
63
-$longopts  = array(
63
+$longopts = array(
64 64
     "name:",
65 65
     "processors:"
66 66
 );
Please login to merge, or discard this patch.
Modelarium/Laravel/Directives/EagerLoadDirective.php 1 patch
Switch Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -60,18 +60,18 @@
 block discarded – undo
60 60
             $targetSingle = mb_strtolower($generator->getInflector()->singularize($datatype->getTarget()));
61 61
             $targetPlural = $datatype->getTargetTable();
62 62
             switch ($datatype->getRelationship()) {
63
-                case RelationshipFactory::RELATIONSHIP_ONE_TO_ONE:
64
-                case RelationshipFactory::MORPH_ONE_TO_ONE:
65
-                    $target = $targetSingle;
66
-                    break;
67
-                case RelationshipFactory::RELATIONSHIP_ONE_TO_MANY:
68
-                case RelationshipFactory::MORPH_ONE_TO_MANY:
69
-                    $target = $datatype->getIsInverse() ? $targetSingle : $targetPlural;
70
-                    break;
71
-                case RelationshipFactory::RELATIONSHIP_MANY_TO_MANY:
72
-                case RelationshipFactory::MORPH_MANY_TO_MANY:
73
-                    $target = $targetPlural;
74
-                    break;
63
+            case RelationshipFactory::RELATIONSHIP_ONE_TO_ONE:
64
+            case RelationshipFactory::MORPH_ONE_TO_ONE:
65
+                $target = $targetSingle;
66
+                break;
67
+            case RelationshipFactory::RELATIONSHIP_ONE_TO_MANY:
68
+            case RelationshipFactory::MORPH_ONE_TO_MANY:
69
+                $target = $datatype->getIsInverse() ? $targetSingle : $targetPlural;
70
+                break;
71
+            case RelationshipFactory::RELATIONSHIP_MANY_TO_MANY:
72
+            case RelationshipFactory::MORPH_MANY_TO_MANY:
73
+                $target = $targetPlural;
74
+                break;
75 75
             }
76 76
         }
77 77
         $generator->with[] = $target;
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
@@ -233,7 +233,7 @@
 block discarded – undo
233 233
             $this->fModel->appendExtradata(
234 234
                 new Extradata(
235 235
                     'hasCan',
236
-                    [ new ExtradataParameter('value', true) ]
236
+                    [new ExtradataParameter('value', true)]
237 237
                 )
238 238
             );
239 239
             return;
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
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         if (!count($indexFields)) {
20 20
             throw new Exception("You must provide at least one field to an index");
21 21
         }
22
-        $generator->createCode[] = '$table->index(["' . implode('", "', $indexFields) .'"]);';
22
+        $generator->createCode[] = '$table->index(["' . implode('", "', $indexFields) . '"]);';
23 23
     }
24 24
 
25 25
     public static function processMigrationFieldDirective(
Please login to merge, or discard this patch.
Modelarium/Laravel/Directives/MigrationUniqueIndexDirective.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
         if (!count($indexFields)) {
57 57
             throw new Exception("You must provide at least one field to an index on a model");
58 58
         }
59
-        $generator->createCode[] = '$table->unique(["' . implode('", "', $indexFields) .'"]);';
59
+        $generator->createCode[] = '$table->unique(["' . implode('", "', $indexFields) . '"]);';
60 60
     }
61 61
 
62 62
     public static function processMigrationFieldDirective(
Please login to merge, or discard this patch.
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.