1 | <?php |
||
26 | class PropertyDescriptor extends DescriptorAbstract implements |
||
27 | Interfaces\PropertyInterface, |
||
28 | Interfaces\VisibilityInterface |
||
29 | { |
||
30 | /** @var ClassDescriptor|TraitDescriptor|null $parent */ |
||
31 | protected $parent; |
||
32 | |||
33 | /** @var Type|null $type */ |
||
34 | protected $type; |
||
35 | |||
36 | /** @var string $default */ |
||
37 | protected $default; |
||
38 | |||
39 | /** @var bool $static */ |
||
40 | protected $static = false; |
||
41 | |||
42 | /** @var string $visibility */ |
||
43 | protected $visibility = 'public'; |
||
44 | |||
45 | /** @var bool */ |
||
46 | private $readOnly = false; |
||
47 | |||
48 | 2 | /** @var bool */ |
|
49 | private $writeOnly = false; |
||
50 | 2 | ||
51 | /** |
||
52 | 2 | * @param ClassDescriptor|TraitDescriptor $parent |
|
53 | 2 | */ |
|
54 | public function setParent(DescriptorAbstract $parent) : void |
||
62 | 1 | ||
63 | /** |
||
64 | * @return ClassDescriptor|TraitDescriptor|null |
||
65 | 1 | */ |
|
66 | public function getParent() : ?DescriptorAbstract |
||
70 | 1 | ||
71 | public function setDefault(?string $default) : void |
||
75 | 1 | ||
76 | public function getDefault() : ?string |
||
80 | 1 | ||
81 | public function setStatic(bool $static) : void |
||
85 | 1 | ||
86 | public function isStatic() : bool |
||
90 | |||
91 | public function setType(Type $type) : void |
||
95 | 1 | ||
96 | 1 | /** |
|
97 | * @return list<string> |
||
98 | */ |
||
99 | 1 | public function getTypes() : array |
|
107 | 2 | ||
108 | 1 | public function getType() : ?Type |
|
120 | 1 | ||
121 | public function setVisibility(string $visibility) : void |
||
125 | |||
126 | public function getVisibility() : string |
||
130 | |||
131 | 2 | /** |
|
132 | 2 | * @return Collection<VarDescriptor> |
|
133 | 1 | */ |
|
134 | public function getVar() : Collection |
||
149 | 1 | ||
150 | /** |
||
151 | * Returns the file associated with the parent class or trait. |
||
152 | */ |
||
153 | public function getFile() : FileDescriptor |
||
157 | |||
158 | 2 | /** |
|
159 | * Returns the property from which this one should inherit, if any. |
||
160 | 2 | */ |
|
161 | 1 | public function getInheritedElement() : ?PropertyDescriptor |
|
179 | |||
180 | public function setReadOnly(bool $value): void |
||
184 | |||
185 | public function isReadOnly() : bool |
||
189 | |||
190 | public function setWriteOnly(bool $value): void |
||
194 | |||
195 | public function isWriteOnly() : bool |
||
199 | } |
||
200 |
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..