update patch 1
This commit is contained in:
@@ -49,7 +49,7 @@ class StringHandler implements HandlerInterface
|
||||
$match = $reader->findPattern($this->patterns->getQuotedStringPattern($quote));
|
||||
|
||||
if (!$match) {
|
||||
throw new InternalErrorException(sprintf('Should have found at least an empty match at %d.', $reader->getPosition()));
|
||||
throw new InternalErrorException(\sprintf('Should have found at least an empty match at %d.', $reader->getPosition()));
|
||||
}
|
||||
|
||||
// check unclosed strings
|
||||
|
||||
+2
-2
@@ -99,9 +99,9 @@ class Token
|
||||
public function __toString(): string
|
||||
{
|
||||
if ($this->value) {
|
||||
return sprintf('<%s "%s" at %s>', $this->type, $this->value, $this->position);
|
||||
return \sprintf('<%s "%s" at %s>', $this->type, $this->value, $this->position);
|
||||
}
|
||||
|
||||
return sprintf('<%s at %s>', $this->type, $this->position);
|
||||
return \sprintf('<%s at %s>', $this->type, $this->position);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,6 +84,6 @@ class TokenizerPatterns
|
||||
|
||||
public function getQuotedStringPattern(string $quote): string
|
||||
{
|
||||
return '~^'.sprintf($this->quotedStringPattern, $quote).'~i';
|
||||
return '~^'.\sprintf($this->quotedStringPattern, $quote).'~i';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user