| 1 | <?php |
||
| 21 | class ContentObserver |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @var ContentRenderInterface |
||
| 25 | */ |
||
| 26 | private $renderer; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var Parser |
||
| 30 | */ |
||
| 31 | private $parser; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * ContentObserver constructor. |
||
| 35 | * |
||
| 36 | * @param Parser $parser |
||
| 37 | * @param ContentRenderInterface $renderer |
||
| 38 | */ |
||
| 39 | public function __construct(Parser $parser, ContentRenderInterface $renderer) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param Docs $docs |
||
| 47 | */ |
||
| 48 | public function saving(Docs $docs): void |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @param string $body |
||
| 59 | * @return ProcessedBody |
||
| 60 | */ |
||
| 61 | private function render(string $body): ProcessedBody |
||
| 69 | } |
||
| 70 |
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@propertyannotation 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.