original_string: public function get_context() : \context {
          if ($this->get('contextid')) {
              return \context::instance_by_id($this->get('contextid'));
          } else if ($this->get('instanceid')) {
              return $this->get_field()->get_handler()->get_instance_context($this->get('instanceid'));
          } else {
              // Context is not yet known (for example, entity is not yet created).
              return \context_system::instance();
          }
      }
code: public function get_context() : \context {
          if ($this->get('contextid')) {
              return \context::instance_by_id($this->get('contextid'));
          } else if ($this->get('instanceid')) {
              return $this->get_field()->get_handler()->get_instance_context($this->get('instanceid'));
          } else {
              // Context is not yet known (for example, entity is not yet created).
              return \context_system::instance();
          }
      }
code_tokens: public function get_context ( ) : \ context { if ( $ this -> get ( 'contextid' ) ) { return \ context :: instance_by_id ( $ this -> get ( 'contextid' ) ) ; } else if ( $ this -> get ( 'instanceid' ) ) { return $ this -> get_field ( ) -> get_handler ( ) -> get_instance_context ( $ this -> get ( 'instanceid' ) ) ; } else { // Context is not yet known (for example, entity is not yet created). return \ context_system :: instance ( ) ; } }
docstring: Return the context of the field
  
  @return \context
docstring_tokens: Return the context of the field