function HTML::processSniff
Process the documentation for a single sniff.
Parameters
\DOMNode $doc The DOMNode object for the sniff.: It represents the "documentation" tag in the XML standard file.
Return value
void
Overrides Generator::processSniff
1 call to HTML::processSniff()
- HTML::generate in vendor/
squizlabs/ php_codesniffer/ src/ Generators/ HTML.php - Generates the documentation for a standard.
File
-
vendor/
squizlabs/ php_codesniffer/ src/ Generators/ HTML.php, line 202
Class
Namespace
PHP_CodeSniffer\GeneratorsCode
public function processSniff(DOMNode $doc) {
$title = $this->getTitle($doc);
echo ' <a name="' . str_replace(' ', '-', $title) . '" />' . PHP_EOL;
echo " <h2>{$title}</h2>" . PHP_EOL;
foreach ($doc->childNodes as $node) {
if ($node->nodeName === 'standard') {
$this->printTextBlock($node);
}
else {
if ($node->nodeName === 'code_comparison') {
$this->printCodeComparisonBlock($node);
}
}
}
}