diff --git a/src/Generators/HTML.php b/src/Generators/HTML.php index 14b2c69fa3..e9cf85c359 100644 --- a/src/Generators/HTML.php +++ b/src/Generators/HTML.php @@ -17,7 +17,6 @@ use DOMDocument; use DOMElement; -use DOMNode; use PHP_CodeSniffer\Config; use PHP_CodeSniffer\Exceptions\GeneratorException; @@ -318,14 +317,14 @@ private function titleToAnchor(string $title) /** * Format a text block found in a standard. * - * @param \DOMNode $node The DOMNode object for the text block. + * @param \DOMElement $node The DOMElement object for the text block. * * @since 3.12.0 Replaces the HTML::printTextBlock() method, * which was deprecated in 3.12.0 and removed in 4.0.0. * * @return string */ - protected function getFormattedTextBlock(DOMNode $node) + protected function getFormattedTextBlock(DOMElement $node) { $content = $node->nodeValue; if (empty($content) === true) { @@ -370,14 +369,14 @@ protected function getFormattedTextBlock(DOMNode $node) /** * Format a code comparison block found in a standard. * - * @param \DOMNode $node The DOMNode object for the code comparison block. + * @param \DOMElement $node The DOMElement object for the code comparison block. * * @since 3.12.0 Replaces the HTML::printCodeComparisonBlock() method, * which was deprecated in 3.12.0 and removed in 4.0.0. * * @return string */ - protected function getFormattedCodeComparisonBlock(DOMNode $node) + protected function getFormattedCodeComparisonBlock(DOMElement $node) { $codeBlocks = $node->getElementsByTagName('code'); $firstCodeElm = $codeBlocks->item(0); diff --git a/src/Generators/Markdown.php b/src/Generators/Markdown.php index 4a82910743..c1e2a422de 100644 --- a/src/Generators/Markdown.php +++ b/src/Generators/Markdown.php @@ -12,7 +12,6 @@ namespace PHP_CodeSniffer\Generators; use DOMElement; -use DOMNode; use PHP_CodeSniffer\Config; use PHP_CodeSniffer\Exceptions\GeneratorException; @@ -125,14 +124,14 @@ protected function processSniff(DOMElement $doc) /** * Format a text block found in a standard. * - * @param \DOMNode $node The DOMNode object for the text block. + * @param \DOMElement $node The DOMElement object for the text block. * * @since 3.12.0 Replaces the Markdown::printTextBlock() method, * which was deprecated in 3.12.0 and removed in 4.0.0. * * @return string */ - protected function getFormattedTextBlock(DOMNode $node) + protected function getFormattedTextBlock(DOMElement $node) { $content = $node->nodeValue; if (empty($content) === true) { @@ -175,14 +174,14 @@ protected function getFormattedTextBlock(DOMNode $node) /** * Format a code comparison block found in a standard. * - * @param \DOMNode $node The DOMNode object for the code comparison block. + * @param \DOMElement $node The DOMElement object for the code comparison block. * * @since 3.12.0 Replaces the Markdown::printCodeComparisonBlock() method, * which was deprecated in 3.12.0 and removed in 4.0.0. * * @return string */ - protected function getFormattedCodeComparisonBlock(DOMNode $node) + protected function getFormattedCodeComparisonBlock(DOMElement $node) { $codeBlocks = $node->getElementsByTagName('code'); $firstCodeElm = $codeBlocks->item(0); diff --git a/src/Generators/Text.php b/src/Generators/Text.php index f902c9bd0b..6866d477c3 100644 --- a/src/Generators/Text.php +++ b/src/Generators/Text.php @@ -14,7 +14,6 @@ namespace PHP_CodeSniffer\Generators; use DOMElement; -use DOMNode; class Text extends Generator { @@ -78,14 +77,14 @@ protected function getFormattedTitle(DOMElement $doc) /** * Format a text block found in a standard. * - * @param \DOMNode $node The DOMNode object for the text block. + * @param \DOMElement $node The DOMElement object for the text block. * * @since 3.12.0 Replaces the Text::printTextBlock() method, * which was deprecated in 3.12.0 and removed in 4.0.0. * * @return string */ - protected function getFormattedTextBlock(DOMNode $node) + protected function getFormattedTextBlock(DOMElement $node) { $text = $node->nodeValue; if (empty($text) === true) { @@ -106,14 +105,14 @@ protected function getFormattedTextBlock(DOMNode $node) /** * Format a code comparison block found in a standard. * - * @param \DOMNode $node The DOMNode object for the code comparison block. + * @param \DOMElement $node The DOMElement object for the code comparison block. * * @since 3.12.0 Replaces the Text::printCodeComparisonBlock() method, * which was deprecated in 3.12.0 and removed in 4.0.0. * * @return string */ - protected function getFormattedCodeComparisonBlock(DOMNode $node) + protected function getFormattedCodeComparisonBlock(DOMElement $node) { $codeBlocks = $node->getElementsByTagName('code'); $firstCodeElm = $codeBlocks->item(0);