diff --git a/src/Generators/HTML.php b/src/Generators/HTML.php index b8529746c9..0939255e4f 100644 --- a/src/Generators/HTML.php +++ b/src/Generators/HTML.php @@ -106,12 +106,7 @@ public function generate() } ob_start(); - foreach ($this->docFiles as $file) { - $doc = new DOMDocument(); - $doc->load($file); - $documentation = $doc->getElementsByTagName('documentation')->item(0); - $this->processSniff($documentation); - } + parent::generate(); $content = ob_get_contents(); ob_end_clean(); diff --git a/src/Generators/Markdown.php b/src/Generators/Markdown.php index 28fa32c84d..c4b89761d8 100644 --- a/src/Generators/Markdown.php +++ b/src/Generators/Markdown.php @@ -9,7 +9,6 @@ namespace PHP_CodeSniffer\Generators; -use DOMDocument; use DOMNode; use PHP_CodeSniffer\Config; @@ -30,12 +29,7 @@ public function generate() } ob_start(); - foreach ($this->docFiles as $file) { - $doc = new DOMDocument(); - $doc->load($file); - $documentation = $doc->getElementsByTagName('documentation')->item(0); - $this->processSniff($documentation); - } + parent::generate(); $content = ob_get_contents(); ob_end_clean();