1 | <?php |
||
27 | class HashMap extends AbstractMap |
||
28 | { |
||
29 | /** |
||
30 | * @var HashProducerInterface |
||
31 | */ |
||
32 | protected static $defaultHashProducer; |
||
33 | |||
34 | 38 | protected static function getHashProducer() : HashProducerInterface |
|
43 | |||
44 | public static function setDefaultHashProducer |
||
52 | |||
53 | /** |
||
54 | * @var Pair<KeyType, ValueType>[] |
||
55 | */ |
||
56 | protected $data = []; |
||
57 | |||
58 | /** |
||
59 | * @var HashProducerInterface |
||
60 | */ |
||
61 | protected $hashProducer; |
||
62 | |||
63 | 38 | public function __construct |
|
71 | |||
72 | /** |
||
73 | * {@inheritDoc} |
||
74 | */ |
||
75 | 6 | public function getIterator() |
|
79 | |||
80 | /** |
||
81 | * {@inheritDoc} |
||
82 | */ |
||
83 | 36 | public function containsKey($key) : bool |
|
87 | |||
88 | /** |
||
89 | * {@inheritDoc} |
||
90 | */ |
||
91 | 40 | public function getPair($key) : Pair |
|
95 | |||
96 | /** |
||
97 | * {@inheritDoc} |
||
98 | */ |
||
99 | 35 | public function insert(Pair $pair) |
|
103 | |||
104 | /** |
||
105 | * {@inheritDoc} |
||
106 | */ |
||
107 | 2 | public function remove($key) |
|
111 | |||
112 | /** |
||
113 | * {@inheritDoc} |
||
114 | */ |
||
115 | 8 | public function size() : int |
|
119 | } |
||
120 |
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.