|
22 | 22 | use phpDocumentor\Reflection\DocBlock\Tags\Factory\AbstractPHPStanFactory; |
23 | 23 | use phpDocumentor\Reflection\DocBlock\Tags\Factory\Factory; |
24 | 24 | use phpDocumentor\Reflection\DocBlock\Tags\Factory\ParamFactory; |
| 25 | +use phpDocumentor\Reflection\DocBlock\Tags\Factory\ReturnFactory; |
25 | 26 | use phpDocumentor\Reflection\DocBlock\Tags\Factory\TypeFactory; |
| 27 | +use phpDocumentor\Reflection\DocBlock\Tags\Factory\VarFactory; |
26 | 28 | use Webmozart\Assert\Assert; |
27 | 29 |
|
28 | 30 | use function array_shift; |
@@ -68,13 +70,16 @@ public static function createInstance(array $additionalTags = []): self |
68 | 70 | $typeFactory = new TypeFactory($typeResolver); |
69 | 71 |
|
70 | 72 | $phpstanTagFactory = new AbstractPHPStanFactory( |
71 | | - new ParamFactory($typeFactory, $descriptionFactory) |
| 73 | + new ParamFactory($typeFactory, $descriptionFactory), |
| 74 | + new VarFactory($typeFactory, $descriptionFactory), |
| 75 | + new ReturnFactory($typeFactory, $descriptionFactory), |
72 | 76 | ); |
73 | 77 |
|
74 | 78 | $tagFactory->addService($descriptionFactory); |
75 | 79 | $tagFactory->addService($typeResolver); |
76 | 80 | $tagFactory->registerTagHandler('param', $phpstanTagFactory); |
77 | 81 | $tagFactory->registerTagHandler('var', $phpstanTagFactory); |
| 82 | + $tagFactory->registerTagHandler('return', $phpstanTagFactory); |
78 | 83 |
|
79 | 84 | $docBlockFactory = new self($descriptionFactory, $tagFactory); |
80 | 85 | foreach ($additionalTags as $tagName => $tagHandler) { |
|
0 commit comments