1: | <?php declare(strict_types = 1); |
2: | |
3: | namespace PHPStan\PhpDoc\Tag; |
4: | |
5: | use PHPStan\Type\Type; |
6: | |
7: | /** |
8: | * @api |
9: | * @final |
10: | */ |
11: | final class ParamClosureThisTag implements TypedTag |
12: | { |
13: | |
14: | public function __construct( |
15: | private Type $type, |
16: | ) |
17: | { |
18: | } |
19: | |
20: | public function getType(): Type |
21: | { |
22: | return $this->type; |
23: | } |
24: | |
25: | /** |
26: | * @return self |
27: | */ |
28: | public function withType(Type $type): TypedTag |
29: | { |
30: | return new self($type); |
31: | } |
32: | |
33: | } |
34: |