Passed
Push — master ( 4c99b3...1b0c60 )
by Bruno
02:54
created
Modelarium/Laravel/Targets/ModelGenerator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
                      * @var ObjectType $object
315 315
                      */
316 316
 
317
-                    if (str_starts_with((string)$name, '__')) {
317
+                    if (str_starts_with((string) $name, '__')) {
318 318
                         // internal type
319 319
                         continue;
320 320
                     }
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
                             continue;
327 327
                         }
328 328
 
329
-                        $methodName = $this->getInflector()->pluralize(mb_strtolower((string)$name));
329
+                        $methodName = $this->getInflector()->pluralize(mb_strtolower((string) $name));
330 330
                         $this->class->addMethod($methodName)
331 331
                                 ->setReturnType('\\Illuminate\\Database\\Eloquent\\Relations\\MorphToMany')
332 332
                                 ->setPublic()
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
             } else {
355 355
                 $this->methodRandom->addBody(
356 356
                     '$data["' . $lowerName . '_id"] = function () {' . "\n" .
357
-                '    return factory(' . $targetClass . '::class)->create()->id;'  . "\n" .
357
+                '    return factory(' . $targetClass . '::class)->create()->id;' . "\n" .
358 358
                 '};'
359 359
                 );
360 360
             }
Please login to merge, or discard this patch.
Modelarium/Laravel/Directives/LaravelMediaLibraryDataDirective.php 2 patches
Switch Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -43,16 +43,16 @@
 block discarded – undo
43 43
              */
44 44
 
45 45
             switch ($arg->name->value) {
46
-                case 'collection':
47
-                    /** @phpstan-ignore-next-line */
48
-                    $collection = $arg->value->value;
49
-                break;
50
-                case 'fields':
51
-                    /** @phpstan-ignore-next-line */
52
-                    foreach ($arg->value->values as $item) {
53
-                        $customFields[] = $item->value;
54
-                    }
55
-                break;
46
+            case 'collection':
47
+                /** @phpstan-ignore-next-line */
48
+                $collection = $arg->value->value;
49
+            break;
50
+            case 'fields':
51
+                /** @phpstan-ignore-next-line */
52
+                foreach ($arg->value->values as $item) {
53
+                    $customFields[] = $item->value;
54
+                }
55
+            break;
56 56
                 }
57 57
         }
58 58
         $studlyCollection = Str::studly($collection);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
                 ->setPublic()
87 87
                 ->setReturnType('string')
88 88
                 ->addComment("Returns the media attribute (url) for the $collection")
89
-                ->setBody( /** @lang PHP */
89
+                ->setBody(/** @lang PHP */
90 90
                     <<< PHP
91 91
     \$image = \$generator->getMedia{$studlyCollection}Collection()->first();
92 92
     if (\$image) {
Please login to merge, or discard this patch.