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

Breadcrumb

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

function CSS::__construct

Initialise the tokenizer.

Pre-checks the content to see if it looks minified.

Parameters

string $content The content to tokenize.:

\PHP_CodeSniffer\Config $config The config data for the run.:

string $eolChar The EOL char used in the content.:

Return value

void

Throws

\PHP_CodeSniffer\Exceptions\TokenizerException If the file appears to be minified.

Overrides Tokenizer::__construct

File

vendor/squizlabs/php_codesniffer/src/Tokenizers/CSS.php, line 32

Class

CSS

Namespace

PHP_CodeSniffer\Tokenizers

Code

public function __construct($content, Config $config, $eolChar = '\\n') {
    if ($this->isMinifiedContent($content, $eolChar) === true) {
        throw new TokenizerException('File appears to be minified and cannot be processed');
    }
    parent::__construct($content, $config, $eolChar);
}
RSS feed
Powered by Drupal