1 | <?php |
||
21 | class ContentObserver |
||
22 | { |
||
23 | /** |
||
24 | * @var Parser |
||
25 | */ |
||
26 | private $parser; |
||
27 | |||
28 | /** |
||
29 | * @var RenderersRepository |
||
30 | */ |
||
31 | private $repository; |
||
32 | |||
33 | /** |
||
34 | * ContentObserver constructor. |
||
35 | * @param Parser $parser |
||
36 | * @param RenderersRepository $repository |
||
37 | */ |
||
38 | public function __construct(Parser $parser, RenderersRepository $repository) |
||
43 | |||
44 | /** |
||
45 | * @param DocsPage $page |
||
46 | * @throws \InvalidArgumentException |
||
47 | */ |
||
48 | public function saving(DocsPage $page): void |
||
56 | |||
57 | /** |
||
58 | * @param DocsPage $page |
||
59 | * @return ContentRenderInterface |
||
60 | * @throws \InvalidArgumentException |
||
61 | */ |
||
62 | private function getRenderer(DocsPage $page): ContentRenderInterface |
||
66 | |||
67 | /** |
||
68 | * @param ContentRenderInterface $renderer |
||
69 | * @param string $body |
||
70 | * @return ProcessedBody |
||
71 | */ |
||
72 | private function render(ContentRenderInterface $renderer, string $body): ProcessedBody |
||
80 | } |
||
81 |
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.