Conditions | 3 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
39 | protected function customRender($prepend = '', $append = '') |
||
40 | { |
||
41 | //Set class |
||
42 | $class = $this->get('class'); |
||
43 | |||
44 | //Set module |
||
45 | $this->data([ |
||
46 | 'module' => $this->get('module'), |
||
47 | 'config' => $this->get('config') ? json_encode($this->get('config')) : null, |
||
48 | ]); |
||
49 | |||
50 | if ($this->error()) { |
||
51 | $this->addClass('has-error'); |
||
52 | } |
||
53 | |||
54 | return $this->toHtml($prepend, $append); |
||
55 | } |
||
56 | } |
||
57 |
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: