| Conditions | 3 |
| Paths | 2 |
| Total Lines | 20 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | public function get() |
||
| 46 | { |
||
| 47 | $error = SessionManager::instance()->getFlashbagError($this->field); |
||
| 48 | |||
| 49 | $result = ''; |
||
| 50 | |||
| 51 | if (!empty($error)) { |
||
| 52 | |||
| 53 | $result = '<div class="form-error ' . $this->field . '">'; |
||
| 54 | |||
| 55 | foreach ($error as $err) { |
||
| 56 | $result .= '<span>' . $this->view->translate($err['message']) . '</span>'; |
||
|
|
|||
| 57 | } |
||
| 58 | |||
| 59 | $result .= '</div>'; |
||
| 60 | |||
| 61 | } |
||
| 62 | |||
| 63 | return $result; |
||
| 64 | } |
||
| 65 | |||
| 76 | } |
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: