| 1 | <?php |
||
| 9 | final class VariableAnnotation |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var AnnotationType |
||
| 13 | */ |
||
| 14 | private $type; |
||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | private $id; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * VariableAnnotation constructor. |
||
| 22 | * |
||
| 23 | * @param string $type |
||
| 24 | * @param string $id |
||
| 25 | */ |
||
| 26 | public function __construct(string $type, string $id) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @return AnnotationType |
||
| 34 | */ |
||
| 35 | public function getType(): AnnotationType |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @return bool |
||
| 42 | */ |
||
| 43 | public function hasId(): bool |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return string |
||
| 50 | */ |
||
| 51 | public function getId(): string |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return string |
||
| 58 | */ |
||
| 59 | public function getName(): string |
||
| 63 | } |
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..