Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
34 | public function init() : void |
||
35 | { |
||
36 | $this->initializer = function (string $name) : stdClass { |
||
37 | return (object) [$name => true]; |
||
38 | }; |
||
39 | $this->lazyMap = new LazyPropertyMap($this->initializer); |
||
40 | $this->array = [ |
||
41 | 'initialized' => ($this->initializer)('initialized'), |
||
42 | ]; |
||
43 | |||
44 | $this->lazyMap->initialized; |
||
|
|||
45 | } |
||
46 | |||
75 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read 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.