1: | <?php declare(strict_types = 1); |
2: | |
3: | namespace PHPStan\Rules; |
4: | |
5: | use PHPStan\Type\Type; |
6: | |
7: | /** |
8: | * @api |
9: | * @final |
10: | */ |
11: | class FoundTypeResult |
12: | { |
13: | |
14: | /** |
15: | * @param string[] $referencedClasses |
16: | * @param list<IdentifierRuleError> $unknownClassErrors |
17: | */ |
18: | public function __construct( |
19: | private Type $type, |
20: | private array $referencedClasses, |
21: | private array $unknownClassErrors, |
22: | private ?string $tip, |
23: | ) |
24: | { |
25: | } |
26: | |
27: | public function getType(): Type |
28: | { |
29: | return $this->type; |
30: | } |
31: | |
32: | /** |
33: | * @return string[] |
34: | */ |
35: | public function getReferencedClasses(): array |
36: | { |
37: | return $this->referencedClasses; |
38: | } |
39: | |
40: | /** |
41: | * @return list<IdentifierRuleError> |
42: | */ |
43: | public function getUnknownClassErrors(): array |
44: | { |
45: | return $this->unknownClassErrors; |
46: | } |
47: | |
48: | public function getTip(): ?string |
49: | { |
50: | return $this->tip; |
51: | } |
52: | |
53: | } |
54: |