| Conditions | 5 |
| Paths | 7 |
| Total Lines | 21 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | public function render($feUserId) |
||
| 45 | { |
||
| 46 | if ($this->security->getUser()->getUid() == $feUserId) { |
||
| 47 | return "self"; |
||
| 48 | } |
||
| 49 | |||
| 50 | $userRole = ''; |
||
| 51 | $feUser = $this->frontendUserRepository->findByUid($feUserId); |
||
| 52 | if ($feUser instanceof FrontendUser) { |
||
| 53 | $userRole = $feUserId->getUserRole(); |
||
|
|
|||
| 54 | } |
||
| 55 | |||
| 56 | if ($userRole === Security::ROLE_LIBRARIAN) { |
||
| 57 | return "librarian"; |
||
| 58 | } |
||
| 59 | |||
| 60 | if ($userRole == Security::ROLE_RESEARCHER) { |
||
| 61 | return "user"; |
||
| 62 | } |
||
| 63 | |||
| 64 | return null; |
||
| 65 | } |
||
| 67 |
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.