1 | <?php |
||
20 | class PropertyDescriptor extends DescriptorAbstract implements |
||
21 | Interfaces\PropertyInterface, |
||
22 | Interfaces\VisibilityInterface |
||
23 | { |
||
24 | /** @var ClassDescriptor|TraitDescriptor $parent */ |
||
25 | protected $parent; |
||
26 | |||
27 | /** @var string[]|null $types */ |
||
28 | protected $types; |
||
29 | |||
30 | /** @var string $default */ |
||
31 | protected $default; |
||
32 | |||
33 | /** @var bool $static */ |
||
34 | protected $static = false; |
||
35 | |||
36 | /** @var string $visibility */ |
||
37 | protected $visibility = 'public'; |
||
38 | |||
39 | /** |
||
40 | * @param ClassDescriptor|TraitDescriptor $parent |
||
41 | */ |
||
42 | 2 | public function setParent($parent) |
|
50 | |||
51 | /** |
||
52 | * @return ClassDescriptor|TraitDescriptor |
||
53 | */ |
||
54 | 1 | public function getParent() |
|
58 | |||
59 | /** |
||
60 | * {@inheritDoc} |
||
61 | */ |
||
62 | 1 | public function setDefault($default) |
|
66 | |||
67 | /** |
||
68 | * {@inheritDoc} |
||
69 | */ |
||
70 | 1 | public function getDefault() |
|
74 | |||
75 | /** |
||
76 | * {@inheritDoc} |
||
77 | */ |
||
78 | 1 | public function setStatic($static) |
|
82 | |||
83 | /** |
||
84 | * {@inheritDoc} |
||
85 | */ |
||
86 | 1 | public function isStatic() |
|
90 | |||
91 | /** |
||
92 | * {@inheritDoc} |
||
93 | */ |
||
94 | 1 | public function setTypes(Type $types) |
|
98 | |||
99 | /** |
||
100 | * {@inheritDoc} |
||
101 | */ |
||
102 | 2 | public function getTypes() |
|
116 | |||
117 | /** |
||
118 | * {@inheritDoc} |
||
119 | */ |
||
120 | 1 | public function setVisibility($visibility) |
|
124 | |||
125 | /** |
||
126 | * {@inheritDoc} |
||
127 | */ |
||
128 | 1 | public function getVisibility() |
|
132 | |||
133 | /** |
||
134 | * @return Collection |
||
135 | */ |
||
136 | 2 | public function getVar() |
|
151 | |||
152 | /** |
||
153 | * Returns the file associated with the parent class or trait. |
||
154 | * |
||
155 | * @return FileDescriptor |
||
156 | */ |
||
157 | 1 | public function getFile() |
|
161 | |||
162 | /** |
||
163 | * Returns the property from which this one should inherit, if any. |
||
164 | * |
||
165 | * @return PropertyDescriptor|null |
||
166 | */ |
||
167 | 2 | public function getInheritedElement() |
|
185 | } |
||
186 |
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..