original_string: public function access($permission, $user_id = null)
      {
          if ($this->isSuperadmin($user_id)) {
              return true;
          }
  
          if ($permission === GC_PERM_SUPERADMIN) {
              return false;
          }
  
          return in_array($permission, $this->getPermissions($user_id));
      }
code: public function access($permission, $user_id = null)
      {
          if ($this->isSuperadmin($user_id)) {
              return true;
          }
  
          if ($permission === GC_PERM_SUPERADMIN) {
              return false;
          }
  
          return in_array($permission, $this->getPermissions($user_id));
      }
code_tokens: public function access ( $ permission , $ user_id = null ) { if ( $ this -> isSuperadmin ( $ user_id ) ) { return true ; } if ( $ permission === GC_PERM_SUPERADMIN ) { return false ; } return in_array ( $ permission , $ this -> getPermissions ( $ user_id ) ) ; }
docstring: Whether a user has an access to do something
  @param string $permission
  @param null|int $user_id
  @return boolean
docstring_tokens: Whether a user has an access to do something