1 | <?php |
||
25 | class GenericContext |
||
26 | { |
||
27 | use AutoConstructTrait; |
||
28 | |||
29 | /** |
||
30 | * @var ObjectType |
||
31 | * @construct required |
||
32 | */ |
||
33 | protected $object; |
||
34 | |||
35 | /** |
||
36 | * @var ReflectionComposite |
||
37 | * @construct required |
||
38 | */ |
||
39 | protected $reflector; |
||
40 | |||
41 | /** |
||
42 | * Get the type for the given generic name |
||
43 | * |
||
44 | * @param string $name |
||
45 | * @return AbstractType |
||
46 | */ |
||
47 | 2 | public function getGenericType(string $name) : AbstractType |
|
54 | } |
||
55 |
Since your code implements the magic setter
_set
, this function will be called for any write access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.