Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/Generators/HTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

use DOMDocument;
use DOMElement;
use DOMNode;
use PHP_CodeSniffer\Config;
use PHP_CodeSniffer\Exceptions\GeneratorException;

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down
9 changes: 4 additions & 5 deletions src/Generators/Markdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace PHP_CodeSniffer\Generators;

use DOMElement;
use DOMNode;
use PHP_CodeSniffer\Config;
use PHP_CodeSniffer\Exceptions\GeneratorException;

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down
9 changes: 4 additions & 5 deletions src/Generators/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
namespace PHP_CodeSniffer\Generators;

use DOMElement;
use DOMNode;

class Text extends Generator
{
Expand Down Expand Up @@ -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) {
Expand All @@ -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);
Expand Down
Loading