These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * Automation tool mixed with code generator for easier continuous development |
||
4 | * |
||
5 | * @link https://github.com/hiqdev/hidev |
||
6 | * @package hidev |
||
7 | * @license BSD-3-Clause |
||
8 | * @copyright Copyright (c) 2015-2018, HiQDev (http://hiqdev.com/) |
||
9 | */ |
||
10 | |||
11 | namespace hidev\handlers; |
||
12 | |||
13 | /** |
||
14 | * Handler for typed files. |
||
15 | * |
||
16 | * If there is a template then renders with it. |
||
17 | * Else renders with renderType. |
||
18 | */ |
||
19 | class TypeHandler extends TemplateHandler |
||
20 | { |
||
21 | 3 | public function render($data) |
|
22 | { |
||
23 | 3 | return $this->existsTemplate() ? $this->renderTemplate($data) : $this->renderType($data); |
|
0 ignored issues
–
show
|
|||
24 | } |
||
25 | } |
||
26 |
If you implement
__call
and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__call
is implemented by a parent class and only the child class knows which methods exist: