diff --git a/src/Generators/HTML.php b/src/Generators/HTML.php
index ba05d072df..1a4833c56c 100644
--- a/src/Generators/HTML.php
+++ b/src/Generators/HTML.php
@@ -108,9 +108,6 @@ public function generate()
}
ob_start();
- $this->printHeader();
- $this->printToc();
-
foreach ($this->docFiles as $file) {
$doc = new DOMDocument();
$doc->load($file);
@@ -118,12 +115,15 @@ public function generate()
$this->processSniff($documentation);
}
- $this->printFooter();
-
$content = ob_get_contents();
ob_end_clean();
- echo $content;
+ if (trim($content) !== '') {
+ echo $this->getFormattedHeader();
+ echo $this->getFormattedToc();
+ echo $content;
+ echo $this->getFormattedFooter();
+ }
}//end generate()
@@ -131,72 +131,132 @@ public function generate()
/**
* Print the header of the HTML page.
*
+ * @deprecated 3.12.0 Use HTML::getFormattedHeader() instead.
+ *
+ * @codeCoverageIgnore
+ *
* @return void
*/
protected function printHeader()
{
- $standard = $this->ruleset->name;
- echo ''.PHP_EOL;
- echo '
'.PHP_EOL;
- echo " $standard Coding Standards".PHP_EOL;
- echo ' '.str_replace("\n", PHP_EOL, self::STYLESHEET).PHP_EOL;
- echo ' '.PHP_EOL;
- echo ' '.PHP_EOL;
- echo " $standard Coding Standards
".PHP_EOL;
+ echo $this->getFormattedHeader();
}//end printHeader()
+ /**
+ * Format the header of the HTML page.
+ *
+ * @since 3.12.0 Replaces the deprecated HTML::printHeader() method.
+ *
+ * @return string
+ */
+ protected function getFormattedHeader()
+ {
+ $standard = $this->ruleset->name;
+ $output = ''.PHP_EOL;
+ $output .= ' '.PHP_EOL;
+ $output .= " $standard Coding Standards".PHP_EOL;
+ $output .= ' '.str_replace("\n", PHP_EOL, self::STYLESHEET).PHP_EOL;
+ $output .= ' '.PHP_EOL;
+ $output .= ' '.PHP_EOL;
+ $output .= " $standard Coding Standards
".PHP_EOL;
+
+ return $output;
+
+ }//end getFormattedHeader()
+
+
/**
* Print the table of contents for the standard.
*
- * The TOC is just an unordered list of bookmarks to sniffs on the page.
+ * @deprecated 3.12.0 Use HTML::getFormattedToc() instead.
+ *
+ * @codeCoverageIgnore
*
* @return void
*/
protected function printToc()
+ {
+ echo $this->getFormattedToc();
+
+ }//end printToc()
+
+
+ /**
+ * Format the table of contents for the standard.
+ *
+ * The TOC is just an unordered list of bookmarks to sniffs on the page.
+ *
+ * @since 3.12.0 Replaces the deprecated HTML::printToc() method.
+ *
+ * @return string
+ */
+ protected function getFormattedToc()
{
// Only show a TOC when there are two or more docs to display.
if (count($this->docFiles) < 2) {
- return;
+ return '';
}
- echo ' Table of Contents
'.PHP_EOL;
- echo ' '.PHP_EOL;
+ $output = ' Table of Contents
'.PHP_EOL;
+ $output .= ' '.PHP_EOL;
foreach ($this->docFiles as $file) {
$doc = new DOMDocument();
$doc->load($file);
$documentation = $doc->getElementsByTagName('documentation')->item(0);
$title = $this->getTitle($documentation);
- echo ' - $title
".PHP_EOL;
+ $output .= ' - '.$title.'
'.PHP_EOL;
}
- echo '
'.PHP_EOL;
+ $output .= '
'.PHP_EOL;
- }//end printToc()
+ return $output;
+
+ }//end getFormattedToc()
/**
* Print the footer of the HTML page.
*
+ * @deprecated 3.12.0 Use HTML::getFormattedFooter() instead.
+ *
+ * @codeCoverageIgnore
+ *
* @return void
*/
protected function printFooter()
+ {
+ echo $this->getFormattedFooter();
+
+ }//end printFooter()
+
+
+ /**
+ * Format the footer of the HTML page.
+ *
+ * @since 3.12.0 Replaces the deprecated HTML::printFooter() method.
+ *
+ * @return string
+ */
+ protected function getFormattedFooter()
{
// Turn off errors so we don't get timezone warnings if people
// don't have their timezone set.
$errorLevel = error_reporting(0);
- echo ' '.PHP_EOL;
+ $output = ' '.PHP_EOL;
error_reporting($errorLevel);
- echo ' '.PHP_EOL;
- echo ''.PHP_EOL;
+ $output .= ' '.PHP_EOL;
+ $output .= ''.PHP_EOL;
- }//end printFooter()
+ return $output;
+
+ }//end getFormattedFooter()
/**
@@ -210,18 +270,22 @@ protected function printFooter()
*/
public function processSniff(DOMNode $doc)
{
- $title = $this->getTitle($doc);
- echo ' '.PHP_EOL;
- echo " $title
".PHP_EOL;
-
+ $content = '';
foreach ($doc->childNodes as $node) {
if ($node->nodeName === 'standard') {
- $this->printTextBlock($node);
+ $content .= $this->getFormattedTextBlock($node);
} else if ($node->nodeName === 'code_comparison') {
- $this->printCodeComparisonBlock($node);
+ $content .= $this->getFormattedCodeComparisonBlock($node);
}
}
+ if (trim($content) !== '') {
+ $title = $this->getTitle($doc);
+ echo ' '.PHP_EOL;
+ echo ' '.$title.'
'.PHP_EOL;
+ echo $content;
+ }
+
}//end processSniff()
@@ -230,9 +294,29 @@ public function processSniff(DOMNode $doc)
*
* @param \DOMNode $node The DOMNode object for the text block.
*
+ * @deprecated 3.12.0 Use HTML::getFormattedTextBlock() instead.
+ *
+ * @codeCoverageIgnore
+ *
* @return void
*/
protected function printTextBlock(DOMNode $node)
+ {
+ echo $this->getFormattedTextBlock($node);
+
+ }//end printTextBlock()
+
+
+ /**
+ * Format a text block found in a standard.
+ *
+ * @param \DOMNode $node The DOMNode object for the text block.
+ *
+ * @since 3.12.0 Replaces the deprecated HTML::printTextBlock() method.
+ *
+ * @return string
+ */
+ protected function getFormattedTextBlock(DOMNode $node)
{
$content = trim($node->nodeValue);
$content = htmlspecialchars($content, (ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401));
@@ -265,9 +349,9 @@ protected function printTextBlock(DOMNode $node)
}
}
- echo ' '.implode('', $lines).'
'.PHP_EOL;
+ return ' '.implode('', $lines).'
'.PHP_EOL;
- }//end printTextBlock()
+ }//end getFormattedTextBlock()
/**
@@ -275,9 +359,29 @@ protected function printTextBlock(DOMNode $node)
*
* @param \DOMNode $node The DOMNode object for the code comparison block.
*
+ * @deprecated 3.12.0 Use HTML::getFormattedCodeComparisonBlock() instead.
+ *
+ * @codeCoverageIgnore
+ *
* @return void
*/
protected function printCodeComparisonBlock(DOMNode $node)
+ {
+ echo $this->getFormattedCodeComparisonBlock($node);
+
+ }//end printCodeComparisonBlock()
+
+
+ /**
+ * Format a code comparison block found in a standard.
+ *
+ * @param \DOMNode $node The DOMNode object for the code comparison block.
+ *
+ * @since 3.12.0 Replaces the deprecated HTML::printCodeComparisonBlock() method.
+ *
+ * @return string
+ */
+ protected function getFormattedCodeComparisonBlock(DOMNode $node)
{
$codeBlocks = $node->getElementsByTagName('code');
@@ -299,18 +403,20 @@ protected function printCodeComparisonBlock(DOMNode $node)
$second = str_replace('', '', $second);
$second = str_replace('', '', $second);
- echo ' '.PHP_EOL;
- echo ' '.PHP_EOL;
- echo " $firstTitle | ".PHP_EOL;
- echo " $secondTitle | ".PHP_EOL;
- echo '
'.PHP_EOL;
- echo ' '.PHP_EOL;
- echo " $first | ".PHP_EOL;
- echo " $second | ".PHP_EOL;
- echo '
'.PHP_EOL;
- echo '
'.PHP_EOL;
+ $output = ' '.PHP_EOL;
+ $output .= ' '.PHP_EOL;
+ $output .= " $firstTitle | ".PHP_EOL;
+ $output .= " $secondTitle | ".PHP_EOL;
+ $output .= '
'.PHP_EOL;
+ $output .= ' '.PHP_EOL;
+ $output .= " $first | ".PHP_EOL;
+ $output .= " $second | ".PHP_EOL;
+ $output .= '
'.PHP_EOL;
+ $output .= '
'.PHP_EOL;
- }//end printCodeComparisonBlock()
+ return $output;
+
+ }//end getFormattedCodeComparisonBlock()
}//end class
diff --git a/src/Generators/Markdown.php b/src/Generators/Markdown.php
index 55ef3972bf..c2687e6dcd 100644
--- a/src/Generators/Markdown.php
+++ b/src/Generators/Markdown.php
@@ -32,8 +32,6 @@ public function generate()
}
ob_start();
- $this->printHeader();
-
foreach ($this->docFiles as $file) {
$doc = new DOMDocument();
$doc->load($file);
@@ -41,11 +39,14 @@ public function generate()
$this->processSniff($documentation);
}
- $this->printFooter();
$content = ob_get_contents();
ob_end_clean();
- echo $content;
+ if (trim($content) !== '') {
+ echo $this->getFormattedHeader();
+ echo $content;
+ echo $this->getFormattedFooter();
+ }
}//end generate()
@@ -53,32 +54,70 @@ public function generate()
/**
* Print the markdown header.
*
+ * @deprecated 3.12.0 Use Markdown::getFormattedHeader() instead.
+ *
+ * @codeCoverageIgnore
+ *
* @return void
*/
protected function printHeader()
+ {
+ echo $this->getFormattedHeader();
+
+ }//end printHeader()
+
+
+ /**
+ * Format the markdown header.
+ *
+ * @since 3.12.0 Replaces the deprecated Markdown::printHeader() method.
+ *
+ * @return string
+ */
+ protected function getFormattedHeader()
{
$standard = $this->ruleset->name;
- echo "# $standard Coding Standard".PHP_EOL;
+ return "# $standard Coding Standard".PHP_EOL;
- }//end printHeader()
+ }//end getFormattedHeader()
/**
* Print the markdown footer.
*
+ * @deprecated 3.12.0 Use Markdown::getFormattedFooter() instead.
+ *
+ * @codeCoverageIgnore
+ *
* @return void
*/
protected function printFooter()
+ {
+ echo $this->getFormattedFooter();
+
+ }//end printFooter()
+
+
+ /**
+ * Format the markdown footer.
+ *
+ * @since 3.12.0 Replaces the deprecated Markdown::printFooter() method.
+ *
+ * @return string
+ */
+ protected function getFormattedFooter()
{
// Turn off errors so we don't get timezone warnings if people
// don't have their timezone set.
$errorLevel = error_reporting(0);
- echo PHP_EOL.'Documentation generated on '.date('r');
- echo ' by [PHP_CodeSniffer '.Config::VERSION.'](https://github.com/PHPCSStandards/PHP_CodeSniffer)'.PHP_EOL;
+ $output = PHP_EOL.'Documentation generated on '.date('r');
+ $output .= ' by [PHP_CodeSniffer '.Config::VERSION.'](https://github.com/PHPCSStandards/PHP_CodeSniffer)'.PHP_EOL;
error_reporting($errorLevel);
- }//end printFooter()
+ return $output;
+
+ }//end getFormattedFooter()
/**
@@ -92,17 +131,21 @@ protected function printFooter()
*/
protected function processSniff(DOMNode $doc)
{
- $title = $this->getTitle($doc);
- echo PHP_EOL."## $title".PHP_EOL.PHP_EOL;
-
+ $content = '';
foreach ($doc->childNodes as $node) {
if ($node->nodeName === 'standard') {
- $this->printTextBlock($node);
+ $content .= $this->getFormattedTextBlock($node);
} else if ($node->nodeName === 'code_comparison') {
- $this->printCodeComparisonBlock($node);
+ $content .= $this->getFormattedCodeComparisonBlock($node);
}
}
+ if (trim($content) !== '') {
+ $title = $this->getTitle($doc);
+ echo PHP_EOL."## $title".PHP_EOL.PHP_EOL;
+ echo $content;
+ }
+
}//end processSniff()
@@ -111,9 +154,29 @@ protected function processSniff(DOMNode $doc)
*
* @param \DOMNode $node The DOMNode object for the text block.
*
+ * @deprecated 3.12.0 Use Markdown::getFormattedTextBlock() instead.
+ *
+ * @codeCoverageIgnore
+ *
* @return void
*/
protected function printTextBlock(DOMNode $node)
+ {
+ echo $this->getFormattedTextBlock($node);
+
+ }//end printTextBlock()
+
+
+ /**
+ * Format a text block found in a standard.
+ *
+ * @param \DOMNode $node The DOMNode object for the text block.
+ *
+ * @since 3.12.0 Replaces the deprecated Markdown::printTextBlock() method.
+ *
+ * @return string
+ */
+ protected function getFormattedTextBlock(DOMNode $node)
{
$content = trim($node->nodeValue);
$content = htmlspecialchars($content, (ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401));
@@ -144,9 +207,9 @@ protected function printTextBlock(DOMNode $node)
}
}
- echo implode(PHP_EOL, $lines).PHP_EOL;
+ return implode(PHP_EOL, $lines).PHP_EOL;
- }//end printTextBlock()
+ }//end getFormattedTextBlock()
/**
@@ -154,9 +217,29 @@ protected function printTextBlock(DOMNode $node)
*
* @param \DOMNode $node The DOMNode object for the code comparison block.
*
+ * @deprecated 3.12.0 Use Markdown::getFormattedCodeComparisonBlock() instead.
+ *
+ * @codeCoverageIgnore
+ *
* @return void
*/
protected function printCodeComparisonBlock(DOMNode $node)
+ {
+ echo $this->getFormattedCodeComparisonBlock($node);
+
+ }//end printCodeComparisonBlock()
+
+
+ /**
+ * Format a code comparison block found in a standard.
+ *
+ * @param \DOMNode $node The DOMNode object for the code comparison block.
+ *
+ * @since 3.12.0 Replaces the deprecated Markdown::printCodeComparisonBlock() method.
+ *
+ * @return string
+ */
+ protected function getFormattedCodeComparisonBlock(DOMNode $node)
{
$codeBlocks = $node->getElementsByTagName('code');
@@ -174,22 +257,24 @@ protected function printCodeComparisonBlock(DOMNode $node)
$second = str_replace('', '', $second);
$second = str_replace('', '', $second);
- echo ' '.PHP_EOL;
- echo ' '.PHP_EOL;
- echo " $firstTitle | ".PHP_EOL;
- echo " $secondTitle | ".PHP_EOL;
- echo '
'.PHP_EOL;
- echo ' '.PHP_EOL;
- echo ''.PHP_EOL.PHP_EOL;
- echo " $first".PHP_EOL.PHP_EOL;
- echo ' | '.PHP_EOL;
- echo ''.PHP_EOL.PHP_EOL;
- echo " $second".PHP_EOL.PHP_EOL;
- echo ' | '.PHP_EOL;
- echo '
'.PHP_EOL;
- echo '
'.PHP_EOL;
-
- }//end printCodeComparisonBlock()
+ $output = ' '.PHP_EOL;
+ $output .= ' '.PHP_EOL;
+ $output .= " $firstTitle | ".PHP_EOL;
+ $output .= " $secondTitle | ".PHP_EOL;
+ $output .= '
'.PHP_EOL;
+ $output .= ' '.PHP_EOL;
+ $output .= ''.PHP_EOL.PHP_EOL;
+ $output .= " $first".PHP_EOL.PHP_EOL;
+ $output .= ' | '.PHP_EOL;
+ $output .= ''.PHP_EOL.PHP_EOL;
+ $output .= " $second".PHP_EOL.PHP_EOL;
+ $output .= ' | '.PHP_EOL;
+ $output .= '
'.PHP_EOL;
+ $output .= '
'.PHP_EOL;
+
+ return $output;
+
+ }//end getFormattedCodeComparisonBlock()
}//end class
diff --git a/src/Generators/Text.php b/src/Generators/Text.php
index e57556d08f..28606bdeb4 100644
--- a/src/Generators/Text.php
+++ b/src/Generators/Text.php
@@ -30,16 +30,19 @@ class Text extends Generator
*/
public function processSniff(DOMNode $doc)
{
- $this->printTitle($doc);
-
+ $content = '';
foreach ($doc->childNodes as $node) {
if ($node->nodeName === 'standard') {
- $this->printTextBlock($node);
+ $content .= $this->getFormattedTextBlock($node);
} else if ($node->nodeName === 'code_comparison') {
- $this->printCodeComparisonBlock($node);
+ $content .= $this->getFormattedCodeComparisonBlock($node);
}
}
+ if (trim($content) !== '') {
+ echo $this->getFormattedTitle($doc), $content;
+ }
+
}//end processSniff()
@@ -50,22 +53,46 @@ public function processSniff(DOMNode $doc)
* It represents the "documentation" tag in the XML
* standard file.
*
+ * @deprecated 3.12.0 Use Text::getFormattedTitle() instead.
+ *
+ * @codeCoverageIgnore
+ *
* @return void
*/
protected function printTitle(DOMNode $doc)
+ {
+ echo $this->getFormattedTitle($doc);
+
+ }//end printTitle()
+
+
+ /**
+ * Format the title area for a single sniff.
+ *
+ * @param \DOMNode $doc The DOMNode object for the sniff.
+ * It represents the "documentation" tag in the XML
+ * standard file.
+ *
+ * @since 3.12.0 Replaces the deprecated Text::printTitle() method.
+ *
+ * @return string
+ */
+ protected function getFormattedTitle(DOMNode $doc)
{
$title = $this->getTitle($doc);
$standard = $this->ruleset->name;
$displayTitle = "$standard CODING STANDARD: $title";
$titleLength = strlen($displayTitle);
- echo PHP_EOL;
- echo str_repeat('-', ($titleLength + 4));
- echo strtoupper(PHP_EOL."| $displayTitle |".PHP_EOL);
- echo str_repeat('-', ($titleLength + 4));
- echo PHP_EOL.PHP_EOL;
+ $output = PHP_EOL;
+ $output .= str_repeat('-', ($titleLength + 4));
+ $output .= strtoupper(PHP_EOL."| $displayTitle |".PHP_EOL);
+ $output .= str_repeat('-', ($titleLength + 4));
+ $output .= PHP_EOL.PHP_EOL;
- }//end printTitle()
+ return $output;
+
+ }//end getFormattedTitle()
/**
@@ -73,9 +100,29 @@ protected function printTitle(DOMNode $doc)
*
* @param \DOMNode $node The DOMNode object for the text block.
*
+ * @deprecated 3.12.0 Use Text::getFormattedTextBlock() instead.
+ *
+ * @codeCoverageIgnore
+ *
* @return void
*/
protected function printTextBlock(DOMNode $node)
+ {
+ echo $this->getFormattedTextBlock($node);
+
+ }//end printTextBlock()
+
+
+ /**
+ * Format a text block found in a standard.
+ *
+ * @param \DOMNode $node The DOMNode object for the text block.
+ *
+ * @since 3.12.0 Replaces the deprecated Text::printTextBlock() method.
+ *
+ * @return string
+ */
+ protected function getFormattedTextBlock(DOMNode $node)
{
$text = trim($node->nodeValue);
$text = str_replace('', '*', $text);
@@ -117,9 +164,9 @@ protected function printTextBlock(DOMNode $node)
}
}//end foreach
- echo implode(PHP_EOL, $lines).PHP_EOL.PHP_EOL;
+ return implode(PHP_EOL, $lines).PHP_EOL.PHP_EOL;
- }//end printTextBlock()
+ }//end getFormattedTextBlock()
/**
@@ -127,9 +174,29 @@ protected function printTextBlock(DOMNode $node)
*
* @param \DOMNode $node The DOMNode object for the code comparison block.
*
+ * @deprecated 3.12.0 Use Text::getFormattedCodeComparisonBlock() instead.
+ *
+ * @codeCoverageIgnore
+ *
* @return void
*/
protected function printCodeComparisonBlock(DOMNode $node)
+ {
+ echo $this->getFormattedCodeComparisonBlock($node);
+
+ }//end printCodeComparisonBlock()
+
+
+ /**
+ * Format a code comparison block found in a standard.
+ *
+ * @param \DOMNode $node The DOMNode object for the code comparison block.
+ *
+ * @since 3.12.0 Replaces the deprecated Text::printCodeComparisonBlock() method.
+ *
+ * @return string
+ */
+ protected function getFormattedCodeComparisonBlock(DOMNode $node)
{
$codeBlocks = $node->getElementsByTagName('code');
$first = trim($codeBlocks->item(0)->nodeValue);
@@ -205,9 +272,9 @@ protected function printCodeComparisonBlock(DOMNode $node)
$maxCodeLines = max(count($firstLines), count($secondLines));
$maxTitleLines = max(count($firstTitleLines), count($secondTitleLines));
- echo str_repeat('-', 41);
- echo ' CODE COMPARISON ';
- echo str_repeat('-', 42).PHP_EOL;
+ $output = str_repeat('-', 41);
+ $output .= ' CODE COMPARISON ';
+ $output .= str_repeat('-', 42).PHP_EOL;
for ($i = 0; $i < $maxTitleLines; $i++) {
if (isset($firstTitleLines[$i]) === true) {
@@ -222,14 +289,14 @@ protected function printCodeComparisonBlock(DOMNode $node)
$secondLineText = '';
}
- echo '| ';
- echo $firstLineText.str_repeat(' ', (46 - strlen($firstLineText)));
- echo ' | ';
- echo $secondLineText.str_repeat(' ', (47 - strlen($secondLineText)));
- echo ' |'.PHP_EOL;
+ $output .= '| ';
+ $output .= $firstLineText.str_repeat(' ', (46 - strlen($firstLineText)));
+ $output .= ' | ';
+ $output .= $secondLineText.str_repeat(' ', (47 - strlen($secondLineText)));
+ $output .= ' |'.PHP_EOL;
}//end for
- echo str_repeat('-', 100).PHP_EOL;
+ $output .= str_repeat('-', 100).PHP_EOL;
for ($i = 0; $i < $maxCodeLines; $i++) {
if (isset($firstLines[$i]) === true) {
@@ -244,16 +311,18 @@ protected function printCodeComparisonBlock(DOMNode $node)
$secondLineText = '';
}
- echo '| ';
- echo $firstLineText.str_repeat(' ', max(0, (47 - strlen($firstLineText))));
- echo '| ';
- echo $secondLineText.str_repeat(' ', max(0, (48 - strlen($secondLineText))));
- echo '|'.PHP_EOL;
+ $output .= '| ';
+ $output .= $firstLineText.str_repeat(' ', max(0, (47 - strlen($firstLineText))));
+ $output .= '| ';
+ $output .= $secondLineText.str_repeat(' ', max(0, (48 - strlen($secondLineText))));
+ $output .= '|'.PHP_EOL;
}//end for
- echo str_repeat('-', 100).PHP_EOL.PHP_EOL;
+ $output .= str_repeat('-', 100).PHP_EOL.PHP_EOL;
- }//end printCodeComparisonBlock()
+ return $output;
+
+ }//end getFormattedCodeComparisonBlock()
}//end class
diff --git a/tests/Core/Generators/Expectations/ExpectedOutputStructureDocs.html b/tests/Core/Generators/Expectations/ExpectedOutputStructureDocs.html
index db1f3a9a92..c959dcac4a 100644
--- a/tests/Core/Generators/Expectations/ExpectedOutputStructureDocs.html
+++ b/tests/Core/Generators/Expectations/ExpectedOutputStructureDocs.html
@@ -81,8 +81,6 @@ Table of Contents
Two Standard Blocks, One Code Comparison
Two Standard Blocks, Three Code Comparisons
-
- No Content
Code Comparison Only, Missing Standard Block
diff --git a/tests/Core/Generators/Expectations/ExpectedOutputStructureDocs.md b/tests/Core/Generators/Expectations/ExpectedOutputStructureDocs.md
index fec8989451..fcbfcefe70 100644
--- a/tests/Core/Generators/Expectations/ExpectedOutputStructureDocs.md
+++ b/tests/Core/Generators/Expectations/ExpectedOutputStructureDocs.md
@@ -1,8 +1,5 @@
# GeneratorTest Coding Standard
-## No Content
-
-
## Code Comparison Only, Missing Standard Block
diff --git a/tests/Core/Generators/Expectations/ExpectedOutputStructureDocs.txt b/tests/Core/Generators/Expectations/ExpectedOutputStructureDocs.txt
index dcb404eec5..4ca1dbcad2 100644
--- a/tests/Core/Generators/Expectations/ExpectedOutputStructureDocs.txt
+++ b/tests/Core/Generators/Expectations/ExpectedOutputStructureDocs.txt
@@ -1,9 +1,4 @@
----------------------------------------------
-| GENERATORTEST CODING STANDARD: NO CONTENT |
----------------------------------------------
-
-
-------------------------------------------------------------------------------
| GENERATORTEST CODING STANDARD: CODE COMPARISON ONLY, MISSING STANDARD BLOCK |
-------------------------------------------------------------------------------
diff --git a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedElementAtWrongLevel.html b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedElementAtWrongLevel.html
deleted file mode 100644
index dfa5670f0e..0000000000
--- a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedElementAtWrongLevel.html
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
- GeneratorTest Coding Standards
-
-
-
- GeneratorTest Coding Standards
-
- Code element at wrong level
-
-
-
diff --git a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedElementAtWrongLevel.md b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedElementAtWrongLevel.md
deleted file mode 100644
index 048f028d57..0000000000
--- a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedElementAtWrongLevel.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# GeneratorTest Coding Standard
-
-## Code element at wrong level
-
-
-Documentation generated on *REDACTED* by [PHP_CodeSniffer *VERSION*](https://github.com/PHPCSStandards/PHP_CodeSniffer)
diff --git a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedElementAtWrongLevel.txt b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedElementAtWrongLevel.txt
deleted file mode 100644
index 940832ced1..0000000000
--- a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedElementAtWrongLevel.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-
---------------------------------------------------------------
-| GENERATORTEST CODING STANDARD: CODE ELEMENT AT WRONG LEVEL |
---------------------------------------------------------------
-
diff --git a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedUnknownElement.html b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedUnknownElement.html
deleted file mode 100644
index 770d08bbc7..0000000000
--- a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedUnknownElement.html
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
- GeneratorTest Coding Standards
-
-
-
- GeneratorTest Coding Standards
-
- Unknown element
-
-
-
diff --git a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedUnknownElement.md b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedUnknownElement.md
deleted file mode 100644
index 211415225f..0000000000
--- a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedUnknownElement.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# GeneratorTest Coding Standard
-
-## Unknown element
-
-
-Documentation generated on *REDACTED* by [PHP_CodeSniffer *VERSION*](https://github.com/PHPCSStandards/PHP_CodeSniffer)
diff --git a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedUnknownElement.txt b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedUnknownElement.txt
deleted file mode 100644
index 3e2f564720..0000000000
--- a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedUnknownElement.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-
---------------------------------------------------
-| GENERATORTEST CODING STANDARD: UNKNOWN ELEMENT |
---------------------------------------------------
-
diff --git a/tests/Core/Generators/Fixtures/HTMLDouble.php b/tests/Core/Generators/Fixtures/HTMLDouble.php
index 9203724085..e3d797c118 100644
--- a/tests/Core/Generators/Fixtures/HTMLDouble.php
+++ b/tests/Core/Generators/Fixtures/HTMLDouble.php
@@ -14,27 +14,29 @@ class HTMLDouble extends HTML
{
/**
- * Print the footer of the HTML page without the date or version nr to make the expectation fixtures stable.
+ * Format the footer of the HTML page without the date or version nr to make the expectation fixtures stable.
*
- * @return void
+ * @return string
*/
- protected function printFooter()
+ protected function getFormattedFooter()
{
- echo ' '.PHP_EOL;
- echo '