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;
    }
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;
    }
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 ; }
Singleton to return or create and return a copy of a content_writer.

@return  content_writer
Singleton to return or create and return a copy of a content_writer .