|
8 | 8 | use PHPStan\PhpDoc\Tag\ImplementsTag;
|
9 | 9 | use PHPStan\PhpDoc\Tag\MethodTag;
|
10 | 10 | use PHPStan\PhpDoc\Tag\MethodTagParameter;
|
| 11 | +use PHPStan\PhpDoc\Tag\MixinTag; |
11 | 12 | use PHPStan\PhpDoc\Tag\ParamTag;
|
12 | 13 | use PHPStan\PhpDoc\Tag\PropertyTag;
|
13 | 14 | use PHPStan\PhpDoc\Tag\ReturnTag;
|
|
16 | 17 | use PHPStan\PhpDoc\Tag\UsesTag;
|
17 | 18 | use PHPStan\PhpDoc\Tag\VarTag;
|
18 | 19 | use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNullNode;
|
| 20 | +use PHPStan\PhpDocParser\Ast\PhpDoc\MixinTagValueNode; |
19 | 21 | use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode;
|
20 | 22 | use PHPStan\PhpDocParser\Ast\PhpDoc\TemplateTagValueNode;
|
21 | 23 | use PHPStan\PhpDocParser\Ast\PhpDoc\ThrowsTagValueNode;
|
@@ -339,6 +341,20 @@ public function resolveThrowsTags(PhpDocNode $phpDocNode, NameScope $nameScope):
|
339 | 341 | return new ThrowsTag(TypeCombinator::union(...$types));
|
340 | 342 | }
|
341 | 343 |
|
| 344 | + /** |
| 345 | + * @param PhpDocNode $phpDocNode |
| 346 | + * @param NameScope $nameScope |
| 347 | + * @return array<MixinTag> |
| 348 | + */ |
| 349 | + public function resolveMixinTags(PhpDocNode $phpDocNode, NameScope $nameScope): array |
| 350 | + { |
| 351 | + return array_map(function (MixinTagValueNode $mixinTagValueNode) use ($nameScope): MixinTag { |
| 352 | + return new MixinTag( |
| 353 | + $this->typeNodeResolver->resolve($mixinTagValueNode->type, $nameScope) |
| 354 | + ); |
| 355 | + }, $phpDocNode->getMixinTagValues()); |
| 356 | + } |
| 357 | + |
342 | 358 | public function resolveDeprecatedTag(PhpDocNode $phpDocNode, NameScope $nameScope): ?\PHPStan\PhpDoc\Tag\DeprecatedTag
|
343 | 359 | {
|
344 | 360 | foreach ($phpDocNode->getDeprecatedTagValues() as $deprecatedTagValue) {
|
|
0 commit comments