original_string: public static function update_endpoint($data) {
          require_capability('moodle/site:config', context_system::instance());
          $endpoint = new endpoint(0, $data);
  
          // Will throw exceptions on validation failures.
          $endpoint->update();
  
          return $endpoint;
      }
code: public static function update_endpoint($data) {
          require_capability('moodle/site:config', context_system::instance());
          $endpoint = new endpoint(0, $data);
  
          // Will throw exceptions on validation failures.
          $endpoint->update();
  
          return $endpoint;
      }
code_tokens: public static function update_endpoint ( $ data ) { require_capability ( 'moodle/site:config' , context_system :: instance ( ) ) ; $ endpoint = new endpoint ( 0 , $ data ) ; // Will throw exceptions on validation failures. $ endpoint -> update ( ) ; return $ endpoint ; }
docstring: Take the data from the mform and update the endpoint.
  
  @param stdClass $data
  @return \core\oauth2\endpoint
docstring_tokens: Take the data from the mform and update the endpoint .