| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | 5 | public function __invoke(User $user): string |
|
| 13 | { |
||
| 14 | 5 | $url = $this->view->serverUrl . '/admin/user/' . $user->getId(); |
|
| 15 | |||
| 16 | 5 | $result = '<ul>'; |
|
| 17 | 5 | $result .= '<li>' . $this->view->escapeHtml($user->getName()) . '</li>'; |
|
|
|
|||
| 18 | 5 | if ($user->getEmail()) { |
|
| 19 | 5 | $result .= '<li><a href="mailto:' . $user->getEmail() . '">' . $this->view->escapeHtml($user->getEmail()) . '</a></li>'; |
|
| 20 | } |
||
| 21 | 5 | $result .= '<li><a href="' . $url . '">' . $this->view->escapeHtml($url) . '</a></li>'; |
|
| 22 | 5 | $result .= '</ul>'; |
|
| 23 | |||
| 24 | 5 | return $result; |
|
| 25 | } |
||
| 27 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.