package and depencies
This commit is contained in:
@@ -23,42 +23,27 @@ use Symfony\Component\CssSelector\Parser\Token;
|
||||
*/
|
||||
class SyntaxErrorException extends ParseException
|
||||
{
|
||||
/**
|
||||
* @return self
|
||||
*/
|
||||
public static function unexpectedToken(string $expectedValue, Token $foundToken)
|
||||
public static function unexpectedToken(string $expectedValue, Token $foundToken): self
|
||||
{
|
||||
return new self(sprintf('Expected %s, but %s found.', $expectedValue, $foundToken));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return self
|
||||
*/
|
||||
public static function pseudoElementFound(string $pseudoElement, string $unexpectedLocation)
|
||||
public static function pseudoElementFound(string $pseudoElement, string $unexpectedLocation): self
|
||||
{
|
||||
return new self(sprintf('Unexpected pseudo-element "::%s" found %s.', $pseudoElement, $unexpectedLocation));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return self
|
||||
*/
|
||||
public static function unclosedString(int $position)
|
||||
public static function unclosedString(int $position): self
|
||||
{
|
||||
return new self(sprintf('Unclosed/invalid string at %s.', $position));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return self
|
||||
*/
|
||||
public static function nestedNot()
|
||||
public static function nestedNot(): self
|
||||
{
|
||||
return new self('Got nested ::not().');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return self
|
||||
*/
|
||||
public static function stringAsFunctionArgument()
|
||||
public static function stringAsFunctionArgument(): self
|
||||
{
|
||||
return new self('String not allowed as function argument.');
|
||||
}
|
||||
|
Reference in New Issue
Block a user