original_string: public function hasRole($name)
      {
          if ($this->RoleID) {
              $role = new Role($this->RoleID);
              if ($role->RoleName == $name) {
                  return true;
              }
          }
  
          foreach ($this->Roles as $role) {
              if ($role->RoleName == $name) {
                  return true;
              }
          }
          return false;
      }
code: public function hasRole($name)
      {
          if ($this->RoleID) {
              $role = new Role($this->RoleID);
              if ($role->RoleName == $name) {
                  return true;
              }
          }
  
          foreach ($this->Roles as $role) {
              if ($role->RoleName == $name) {
                  return true;
              }
          }
          return false;
      }
code_tokens: public function hasRole ( $ name ) { if ( $ this -> RoleID ) { $ role = new Role ( $ this -> RoleID ) ; if ( $ role -> RoleName == $ name ) { return true ; } } foreach ( $ this -> Roles as $ role ) { if ( $ role -> RoleName == $ name ) { return true ; } } return false ; }
docstring: Checks if user has a specific role
  @param $name string
  @return bool
docstring_tokens: Checks if user has a specific role