@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | /** |
59 | 59 | * Checks if the user has a specific role |
60 | 60 | * |
61 | - * @param ElggUser $user User entity |
|
61 | + * @param ElggUser|null $user User entity |
|
62 | 62 | * @return bool True if the user belongs to the passed role, false otherwise |
63 | 63 | */ |
64 | 64 | public function hasRole(ElggUser $user, $role_name = self::DEFAULT_ROLE) { |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | |
402 | 402 | /** |
403 | 403 | * Gets all reserved role names |
404 | - * @return array The list of reserved role names |
|
404 | + * @return string[] The list of reserved role names |
|
405 | 405 | */ |
406 | 406 | public function getReservedRoleNames() { |
407 | 407 | return array(self::DEFAULT_ROLE, self::ADMIN_ROLE, self::VISITOR_ROLE); |
@@ -578,7 +578,7 @@ discard block |
||
578 | 578 | * |
579 | 579 | * @param ElggRole $role Role object |
580 | 580 | * @param string $action Registered action name |
581 | - * @return boolean|void |
|
581 | + * @return false|null |
|
582 | 582 | */ |
583 | 583 | function actionGatekeeper(\ElggRole $role, $action = '') { |
584 | 584 | $role_perms = $this->getPermissions($role, 'actions'); |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | * @param string $action The registered action name |
105 | 105 | * @param boolean $return_value Return value |
106 | 106 | * @param mixed $params An associative array of parameters provided by the hook trigger |
107 | - * @return boolean|void True if the action should be executed, false if it should be stopped |
|
107 | + * @return null|false True if the action should be executed, false if it should be stopped |
|
108 | 108 | */ |
109 | 109 | function roles_actions_permissions($hook_name, $action, $return_value, $params) { |
110 | 110 | |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | * @param string $entity_type "user" |
238 | 238 | * @param mixed $return_value Return value |
239 | 239 | * @param mixed $params An associative array of parameters provided by the hook trigger |
240 | - * @return void |
|
240 | + * @return boolean|null |
|
241 | 241 | */ |
242 | 242 | function roles_user_settings_save($hook_name, $entity_type, $return_value, $params) { |
243 | 243 | $role_name = get_input('role'); |
@@ -205,7 +205,7 @@ |
||
205 | 205 | * |
206 | 206 | * @param string $rule The permission rule to check |
207 | 207 | * @param string $path The path to match against |
208 | - * @return boole True if the rule matches the path, false otherwise |
|
208 | + * @return boolean True if the rule matches the path, false otherwise |
|
209 | 209 | */ |
210 | 210 | function roles_path_match($rule, $path) { |
211 | 211 | return roles()->matchPath($rule, $path); |