@@ -314,7 +314,7 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -43,16 +43,16 @@ |
||
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); |
@@ -86,7 +86,7 @@ |
||
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) { |