original_string: protected function get_writer_instance() : content_writer {
          if (null === $this->realwriter) {
              if (PHPUNIT_TEST) {
                  $this->realwriter = new \core_privacy\tests\request\content_writer(static::instance());
              } else {
                  $this->realwriter = new moodle_content_writer(static::instance());
              }
          }
  
          return $this->realwriter;
      }
code: protected function get_writer_instance() : content_writer {
          if (null === $this->realwriter) {
              if (PHPUNIT_TEST) {
                  $this->realwriter = new \core_privacy\tests\request\content_writer(static::instance());
              } else {
                  $this->realwriter = new moodle_content_writer(static::instance());
              }
          }
  
          return $this->realwriter;
      }
code_tokens: protected function get_writer_instance ( ) : content_writer { if ( null === $ this -> realwriter ) { if ( PHPUNIT_TEST ) { $ this -> realwriter = new \ core_privacy \ tests \ request \ content_writer ( static :: instance ( ) ) ; } else { $ this -> realwriter = new moodle_content_writer ( static :: instance ( ) ) ; } } return $ this -> realwriter ; }
docstring: Singleton to return or create and return a copy of a content_writer.
  
  @return  content_writer
docstring_tokens: Singleton to return or create and return a copy of a content_writer .