original_string: public function get_instance_context(int $instanceid = 0) : \context {
          if ($instanceid > 0) {
              return \context_course::instance($instanceid);
          } else {
              return \context_system::instance();
          }
      }
code: public function get_instance_context(int $instanceid = 0) : \context {
          if ($instanceid > 0) {
              return \context_course::instance($instanceid);
          } else {
              return \context_system::instance();
          }
      }
code_tokens: public function get_instance_context ( int $ instanceid = 0 ) : \ context { if ( $ instanceid > 0 ) { return \ context_course :: instance ( $ instanceid ) ; } else { return \ context_system :: instance ( ) ; } }
docstring: Returns the context for the data associated with the given instanceid.
  
  @param int $instanceid id of the record to get the context for
  @return \context the context for the given record
docstring_tokens: Returns the context for the data associated with the given instanceid .