Total Lines | 18 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | interface PluginInterface |
||
11 | { |
||
12 | /** |
||
13 | * Called when the plugin is added to the view. |
||
14 | * |
||
15 | * @param ViewInterface $view |
||
16 | */ |
||
17 | public function onAdd(ViewInterface $view); |
||
18 | |||
19 | /** |
||
20 | * Called when view renders a template. |
||
21 | * |
||
22 | * @param ViewInterface $view |
||
23 | * @param string $template Template filename |
||
24 | * @param array $context |
||
25 | */ |
||
26 | public function onRender(ViewInterface $view, $template, array $context); |
||
27 | } |
||
28 |
For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a
@return
doc comment to communicate to implementors of these methods what they are expected to return.