diff vendor/squizlabs/php_codesniffer/src/Tokenizers/CSS.php @ 18:af1871eacc83

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:33:08 +0100
parents 129ea1e6d783
children
line wrap: on
line diff
--- a/vendor/squizlabs/php_codesniffer/src/Tokenizers/CSS.php	Thu Feb 28 13:21:36 2019 +0000
+++ b/vendor/squizlabs/php_codesniffer/src/Tokenizers/CSS.php	Thu May 09 15:33:08 2019 +0100
@@ -27,7 +27,7 @@
      * @param string                  $eolChar The EOL char used in the content.
      *
      * @return void
-     * @throws TokenizerException If the file appears to be minified.
+     * @throws \PHP_CodeSniffer\Exceptions\TokenizerException If the file appears to be minified.
      */
     public function __construct($content, Config $config, $eolChar='\n')
     {
@@ -35,7 +35,7 @@
             throw new TokenizerException('File appears to be minified and cannot be processed');
         }
 
-        return parent::__construct($content, $config, $eolChar);
+        parent::__construct($content, $config, $eolChar);
 
     }//end __construct()
 
@@ -97,6 +97,9 @@
                 $token['code'] = T_STRING;
             }
 
+            $token['content'] = str_replace('^PHPCS_CSS_T_OPEN_TAG^', '<?php', $token['content']);
+            $token['content'] = str_replace('^PHPCS_CSS_T_CLOSE_TAG^', '?>', $token['content']);
+
             if (PHP_CODESNIFFER_VERBOSITY > 1) {
                 $type    = $token['type'];
                 $content = Util\Common::prepareForOutput($token['content']);