|
12 | 12 | namespace PHP_CodeSniffer\Generators;
|
13 | 13 |
|
14 | 14 | use DOMElement;
|
15 |
| -use DOMNode; |
16 | 15 | use PHP_CodeSniffer\Config;
|
17 | 16 | use PHP_CodeSniffer\Exceptions\GeneratorException;
|
18 | 17 |
|
@@ -125,14 +124,14 @@ protected function processSniff(DOMElement $doc)
|
125 | 124 | /**
|
126 | 125 | * Format a text block found in a standard.
|
127 | 126 | *
|
128 |
| - * @param \DOMNode $node The DOMNode object for the text block. |
| 127 | + * @param \DOMElement $node The DOMElement object for the text block. |
129 | 128 | *
|
130 | 129 | * @since 3.12.0 Replaces the Markdown::printTextBlock() method,
|
131 | 130 | * which was deprecated in 3.12.0 and removed in 4.0.0.
|
132 | 131 | *
|
133 | 132 | * @return string
|
134 | 133 | */
|
135 |
| - protected function getFormattedTextBlock(DOMNode $node) |
| 134 | + protected function getFormattedTextBlock(DOMElement $node) |
136 | 135 | {
|
137 | 136 | $content = $node->nodeValue;
|
138 | 137 | if (empty($content) === true) {
|
@@ -175,14 +174,14 @@ protected function getFormattedTextBlock(DOMNode $node)
|
175 | 174 | /**
|
176 | 175 | * Format a code comparison block found in a standard.
|
177 | 176 | *
|
178 |
| - * @param \DOMNode $node The DOMNode object for the code comparison block. |
| 177 | + * @param \DOMElement $node The DOMElement object for the code comparison block. |
179 | 178 | *
|
180 | 179 | * @since 3.12.0 Replaces the Markdown::printCodeComparisonBlock() method,
|
181 | 180 | * which was deprecated in 3.12.0 and removed in 4.0.0.
|
182 | 181 | *
|
183 | 182 | * @return string
|
184 | 183 | */
|
185 |
| - protected function getFormattedCodeComparisonBlock(DOMNode $node) |
| 184 | + protected function getFormattedCodeComparisonBlock(DOMElement $node) |
186 | 185 | {
|
187 | 186 | $codeBlocks = $node->getElementsByTagName('code');
|
188 | 187 | $firstCodeElm = $codeBlocks->item(0);
|
|
0 commit comments