public function isUserInRoleById(int $userId): bool
    {
        if (isset($this->users[$userId])) {
            return true;
        }

        return false;
    }
public function isUserInRoleById(int $userId): bool
    {
        if (isset($this->users[$userId])) {
            return true;
        }

        return false;
    }
public function isUserInRoleById ( int $ userId ) : bool { if ( isset ( $ this -> users [ $ userId ] ) ) { return true ; } return false ; }
Check if an user is in role, use the user Id.

@param int $userId

@return bool
Check if an user is in role use the user Id .