1 | <?php |
||
11 | final class VariableAnnotation |
||
12 | { |
||
13 | /** |
||
14 | * @var AnnotationType |
||
15 | */ |
||
16 | private $type; |
||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | private $id; |
||
21 | |||
22 | /** |
||
23 | * VariableAnnotation constructor. |
||
24 | * |
||
25 | * @param string $type |
||
26 | * @param string $id |
||
27 | * |
||
28 | * @throws Exception |
||
29 | */ |
||
30 | public function __construct(string $type, string $id) |
||
35 | |||
36 | /** |
||
37 | * @return AnnotationType |
||
38 | */ |
||
39 | public function getType(): AnnotationType |
||
43 | |||
44 | /** |
||
45 | * @return bool |
||
46 | */ |
||
47 | public function hasId(): bool |
||
51 | |||
52 | /** |
||
53 | * @return string |
||
54 | */ |
||
55 | public function getId(): string |
||
59 | |||
60 | /** |
||
61 | * @return string |
||
62 | */ |
||
63 | public function getName(): string |
||
67 | } |
||
68 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..