| Total Complexity | 8 |
| Total Lines | 68 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | trait ForumsUserTrait |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * {@inheritDoc} |
||
| 26 | */ |
||
| 27 | public function getId(): int |
||
| 28 | { |
||
| 29 | return (int)$this->get('id'); |
||
|
|
|||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * {@inheritDoc} |
||
| 34 | */ |
||
| 35 | public function isUser(ForumsUserInterface $user): bool |
||
| 36 | { |
||
| 37 | return $user->getId() === $this->getId(); |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Checks if user is forbidden. |
||
| 42 | * |
||
| 43 | * @return bool |
||
| 44 | */ |
||
| 45 | public function isLocked(): bool |
||
| 46 | { |
||
| 47 | return (bool)$this->get('user_lock'); |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Checks if user is forbidden. |
||
| 52 | * |
||
| 53 | * @return bool |
||
| 54 | */ |
||
| 55 | public function isActivated(): bool |
||
| 56 | { |
||
| 57 | return !$this->get('activate_code'); |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * Get role. |
||
| 62 | * |
||
| 63 | * @return string |
||
| 64 | */ |
||
| 65 | public function getRole(): string |
||
| 66 | { |
||
| 67 | return $this->get('user_type'); |
||
| 68 | } |
||
| 69 | |||
| 70 | /** |
||
| 71 | * {@inheritDoc} |
||
| 72 | */ |
||
| 73 | public function numberOfPostings(): int |
||
| 76 | } |
||
| 77 | |||
| 78 | /** |
||
| 79 | * {@inheritDoc} |
||
| 80 | */ |
||
| 81 | public function permission(string $resource, ResourceAI $identity = null): bool |
||
| 92 |
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.