Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / css-selector / Parser / Handler / StringHandler.php
index f842e1ce20eafbf202d8bf0419664835c45f3253..00155b04650d0a6dc7c99a570acd3821b45ca315 100644 (file)
@@ -15,9 +15,9 @@ use Symfony\Component\CssSelector\Exception\InternalErrorException;
 use Symfony\Component\CssSelector\Exception\SyntaxErrorException;
 use Symfony\Component\CssSelector\Parser\Reader;
 use Symfony\Component\CssSelector\Parser\Token;
-use Symfony\Component\CssSelector\Parser\TokenStream;
 use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerEscaping;
 use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns;
+use Symfony\Component\CssSelector\Parser\TokenStream;
 
 /**
  * CSS selector comment handler.
@@ -47,7 +47,7 @@ class StringHandler implements HandlerInterface
     {
         $quote = $reader->getSubstring(1);
 
-        if (!in_array($quote, array("'", '"'))) {
+        if (!\in_array($quote, array("'", '"'))) {
             return false;
         }
 
@@ -59,18 +59,18 @@ class StringHandler implements HandlerInterface
         }
 
         // check unclosed strings
-        if (strlen($match[0]) === $reader->getRemainingLength()) {
+        if (\strlen($match[0]) === $reader->getRemainingLength()) {
             throw SyntaxErrorException::unclosedString($reader->getPosition() - 1);
         }
 
         // check quotes pairs validity
-        if ($quote !== $reader->getSubstring(1, strlen($match[0]))) {
+        if ($quote !== $reader->getSubstring(1, \strlen($match[0]))) {
             throw SyntaxErrorException::unclosedString($reader->getPosition() - 1);
         }
 
         $string = $this->escaping->escapeUnicodeAndNewLine($match[0]);
         $stream->push(new Token(Token::TYPE_STRING, $string, $reader->getPosition()));
-        $reader->moveForward(strlen($match[0]) + 1);
+        $reader->moveForward(\strlen($match[0]) + 1);
 
         return true;
     }