original_string: public static function create_endpoints_for_standard_issuer($type, $issuer) {
          require_capability('moodle/site:config', context_system::instance());
          if ($type == 'google') {
              $issuer = self::create_endpoints_for_google($issuer);
              self::discover_endpoints($issuer);
              return $issuer;
          } else if ($type == 'microsoft') {
              return self::create_endpoints_for_microsoft($issuer);
          } else if ($type == 'facebook') {
              return self::create_endpoints_for_facebook($issuer);
          } else if ($type == 'nextcloud') {
              return self::create_endpoints_for_nextcloud($issuer);
          } else {
              throw new moodle_exception('OAuth 2 service type not recognised: ' . $type);
          }
      }
code: public static function create_endpoints_for_standard_issuer($type, $issuer) {
          require_capability('moodle/site:config', context_system::instance());
          if ($type == 'google') {
              $issuer = self::create_endpoints_for_google($issuer);
              self::discover_endpoints($issuer);
              return $issuer;
          } else if ($type == 'microsoft') {
              return self::create_endpoints_for_microsoft($issuer);
          } else if ($type == 'facebook') {
              return self::create_endpoints_for_facebook($issuer);
          } else if ($type == 'nextcloud') {
              return self::create_endpoints_for_nextcloud($issuer);
          } else {
              throw new moodle_exception('OAuth 2 service type not recognised: ' . $type);
          }
      }
code_tokens: public static function create_endpoints_for_standard_issuer ( $ type , $ issuer ) { require_capability ( 'moodle/site:config' , context_system :: instance ( ) ) ; if ( $ type == 'google' ) { $ issuer = self :: create_endpoints_for_google ( $ issuer ) ; self :: discover_endpoints ( $ issuer ) ; return $ issuer ; } else if ( $ type == 'microsoft' ) { return self :: create_endpoints_for_microsoft ( $ issuer ) ; } else if ( $ type == 'facebook' ) { return self :: create_endpoints_for_facebook ( $ issuer ) ; } else if ( $ type == 'nextcloud' ) { return self :: create_endpoints_for_nextcloud ( $ issuer ) ; } else { throw new moodle_exception ( 'OAuth 2 service type not recognised: ' . $ type ) ; } }
docstring: Create endpoints for standard issuers, based on the issuer created from submitted data.
  @param string $type One of google, facebook, microsoft, nextcloud
  @param issuer $issuer issuer the endpoints should be created for.
  @return \core\oauth2\issuer
docstring_tokens: Create endpoints for standard issuers based on the issuer created from submitted data .