Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. HTML.php

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

HTML

Namespace

PHP_CodeSniffer\Generators

Code

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);
            }
        }
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal