| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 18 |
| Ratio | 100 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | View Code Duplication | protected function defaultRender($prepend = '', $append = '') |
|
| 24 | { |
||
| 25 | if ($this->error()) { |
||
| 26 | $this->wrapper->addClass('has-error'); |
||
| 27 | } |
||
| 28 | |||
| 29 | return <<<EOT |
||
| 30 | {$this->label} |
||
| 31 | |||
| 32 | <div> |
||
| 33 | {$this->errorLabel} |
||
| 34 | {$prepend} |
||
| 35 | <p>{$this->input->val()}</p> |
||
| 36 | {$this->input} |
||
| 37 | {$append} |
||
| 38 | </div> |
||
| 39 | EOT; |
||
| 40 | } |
||
| 41 | } |
||
| 42 |
If you implement
__calland 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
__callis implemented by a parent class and only the child class knows which methods exist: