function Markdown::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 Markdown::processSniff()
- Markdown::generate in vendor/
squizlabs/ php_codesniffer/ src/ Generators/ Markdown.php - Generates the documentation for a standard.
File
-
vendor/
squizlabs/ php_codesniffer/ src/ Generators/ Markdown.php, line 88
Class
Namespace
PHP_CodeSniffer\GeneratorsCode
protected function processSniff(DOMNode $doc) {
$title = $this->getTitle($doc);
echo PHP_EOL . "## {$title}" . PHP_EOL;
foreach ($doc->childNodes as $node) {
if ($node->nodeName === 'standard') {
$this->printTextBlock($node);
}
else {
if ($node->nodeName === 'code_comparison') {
$this->printCodeComparisonBlock($node);
}
}
}
}