From 2a462bb7e43b848d0277bd27e14ca4d645230eeb Mon Sep 17 00:00:00 2001 From: JoshyPHP Date: Wed, 25 Mar 2015 01:13:31 +0100 Subject: [ticket/11768] Removed get_parser() / get_renderer() accessors There's no need to access the s9e\TextFormatter objects outside of events. PHPBB3-11768 --- phpBB/phpbb/textformatter/s9e/parser.php | 10 ---------- phpBB/phpbb/textformatter/s9e/renderer.php | 10 ---------- tests/text_formatter/s9e/parser_test.php | 7 ------- tests/text_formatter/s9e/renderer_test.php | 7 ------- 4 files changed, 34 deletions(-) diff --git a/phpBB/phpbb/textformatter/s9e/parser.php b/phpBB/phpbb/textformatter/s9e/parser.php index 2f4a03d4c2..6fda94d7ba 100644 --- a/phpBB/phpbb/textformatter/s9e/parser.php +++ b/phpBB/phpbb/textformatter/s9e/parser.php @@ -190,16 +190,6 @@ class parser implements \phpbb\textformatter\parser_interface return array_unique($errors); } - /** - * Return the instance of s9e\TextFormatter\Parser used by this object - * - * @return \s9e\TextFormatter\Parser - */ - public function get_parser() - { - return $this->parser; - } - /** * {@inheritdoc} */ diff --git a/phpBB/phpbb/textformatter/s9e/renderer.php b/phpBB/phpbb/textformatter/s9e/renderer.php index 75de54d942..b68c9dd9be 100644 --- a/phpBB/phpbb/textformatter/s9e/renderer.php +++ b/phpBB/phpbb/textformatter/s9e/renderer.php @@ -146,16 +146,6 @@ class renderer implements \phpbb\textformatter\renderer_interface $this->renderer->setParameter('STYLE_ID', $user->style['style_id']); } - /** - * Return the instance of s9e\TextFormatter\Renderer used by this object - * - * @return \s9e\TextFormatter\Renderer - */ - public function get_renderer() - { - return $this->renderer; - } - /** * {@inheritdoc} */ diff --git a/tests/text_formatter/s9e/parser_test.php b/tests/text_formatter/s9e/parser_test.php index 725ff42bfd..71433e209f 100644 --- a/tests/text_formatter/s9e/parser_test.php +++ b/tests/text_formatter/s9e/parser_test.php @@ -167,11 +167,4 @@ class phpbb_textformatter_s9e_parser_test extends phpbb_test_case ) ); } - - public function test_get_parser() - { - $container = $this->get_test_case_helpers()->set_s9e_services(); - $parser = $container->get('text_formatter.parser'); - $this->assertInstanceOf('s9e\\TextFormatter\\Parser', $parser->get_parser()); - } } diff --git a/tests/text_formatter/s9e/renderer_test.php b/tests/text_formatter/s9e/renderer_test.php index b93fd8bbe6..ce2fccd9b7 100644 --- a/tests/text_formatter/s9e/renderer_test.php +++ b/tests/text_formatter/s9e/renderer_test.php @@ -354,11 +354,4 @@ class phpbb_textformatter_s9e_renderer_test extends phpbb_test_case ); } } - - public function test_get_renderer() - { - $container = $this->get_test_case_helpers()->set_s9e_services(); - $renderer = $container->get('text_formatter.renderer'); - $this->assertInstanceOf('s9e\\TextFormatter\\Renderer', $renderer->get_renderer()); - } } -- cgit v1.2.1