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