| Conditions | 3 |
| Paths | 2 |
| Total Lines | 20 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 15 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | 7 | public function __invoke(?User $user): string |
|
| 13 | { |
||
| 14 | 7 | if (!$user) { |
|
| 15 | 1 | return '<p>Utilisateur inconnu. Il a probablement été supprimé.</p>'; |
|
| 16 | } |
||
| 17 | |||
| 18 | 6 | $url = $this->view->serverUrl . '/admin/user/' . $user->getId(); |
|
| 19 | |||
| 20 | 6 | $result = '<ul>'; |
|
| 21 | 6 | $result .= '<li>' . $this->view->escapeHtml($user->getFirstName()) . '</li>'; |
|
|
|
|||
| 22 | 6 | $result .= '<li>' . $this->view->escapeHtml($user->getLastName()) . '</li>'; |
|
| 23 | 6 | $result .= '<li>' . $this->view->escapeHtml($user->getStreet()) . '</li>'; |
|
| 24 | 6 | $result .= '<li>' . $this->view->escapeHtml($user->getPostcode()) . '</li>'; |
|
| 25 | 6 | $result .= '<li>' . $this->view->escapeHtml($user->getLocality()) . '</li>'; |
|
| 26 | 6 | $result .= '<li>' . $this->view->escapeHtml($user->getCountry() ? $user->getCountry()->getName() : '') . '</li>'; |
|
| 27 | 6 | $result .= '<li><a href="mailto:' . $this->view->escapeHtmlAttr($user->getEmail()) . '">' . $this->view->escapeHtml($user->getEmail()) . '</a></li>'; |
|
| 28 | 6 | $result .= '<li><a href="' . $url . '">' . $this->view->escapeHtml($url) . '</a></li>'; |
|
| 29 | 6 | $result .= '</ul>'; |
|
| 30 | |||
| 31 | 6 | return $result; |
|
| 32 | } |
||
| 34 |
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.