original_string: public function getRoleForSite($idSite)
      {
          if ($this->hasSuperUserAccess
              || in_array($idSite, $this->getSitesIdWithAdminAccess())
          ) {
              return 'admin';
          }
  
          if (in_array($idSite, $this->getSitesIdWithWriteAccess())) {
              return 'write';
          }
  
          if (in_array($idSite, $this->getSitesIdWithViewAccess())) {
              return 'view';
          }
  
          return 'noaccess';
      }
code: public function getRoleForSite($idSite)
      {
          if ($this->hasSuperUserAccess
              || in_array($idSite, $this->getSitesIdWithAdminAccess())
          ) {
              return 'admin';
          }
  
          if (in_array($idSite, $this->getSitesIdWithWriteAccess())) {
              return 'write';
          }
  
          if (in_array($idSite, $this->getSitesIdWithViewAccess())) {
              return 'view';
          }
  
          return 'noaccess';
      }
code_tokens: public function getRoleForSite ( $ idSite ) { if ( $ this -> hasSuperUserAccess || in_array ( $ idSite , $ this -> getSitesIdWithAdminAccess ( ) ) ) { return 'admin' ; } if ( in_array ( $ idSite , $ this -> getSitesIdWithWriteAccess ( ) ) ) { return 'write' ; } if ( in_array ( $ idSite , $ this -> getSitesIdWithViewAccess ( ) ) ) { return 'view' ; } return 'noaccess' ; }
docstring: Returns the level of access the current user has to the given site.
  
  @param int $idSite The site to check.
  @return string The access level, eg, 'view', 'admin', 'noaccess'.
docstring_tokens: Returns the level of access the current user has to the given site .