ExceptionInterface.php
2 years ago
ExpressionErrorException.php
2 years ago
InternalErrorException.php
2 years ago
ParseException.php
2 years ago
SyntaxErrorException.php
2 years ago
index.php
2 years ago
SyntaxErrorException.php
28 lines
| 1 | <?php |
| 2 | namespace MailPoetVendor\Symfony\Component\CssSelector\Exception; |
| 3 | if (!defined('ABSPATH')) exit; |
| 4 | use MailPoetVendor\Symfony\Component\CssSelector\Parser\Token; |
| 5 | class SyntaxErrorException extends ParseException |
| 6 | { |
| 7 | public static function unexpectedToken(string $expectedValue, Token $foundToken) |
| 8 | { |
| 9 | return new self(\sprintf('Expected %s, but %s found.', $expectedValue, $foundToken)); |
| 10 | } |
| 11 | public static function pseudoElementFound(string $pseudoElement, string $unexpectedLocation) |
| 12 | { |
| 13 | return new self(\sprintf('Unexpected pseudo-element "::%s" found %s.', $pseudoElement, $unexpectedLocation)); |
| 14 | } |
| 15 | public static function unclosedString(int $position) |
| 16 | { |
| 17 | return new self(\sprintf('Unclosed/invalid string at %s.', $position)); |
| 18 | } |
| 19 | public static function nestedNot() |
| 20 | { |
| 21 | return new self('Got nested ::not().'); |
| 22 | } |
| 23 | public static function stringAsFunctionArgument() |
| 24 | { |
| 25 | return new self('String not allowed as function argument.'); |
| 26 | } |
| 27 | } |
| 28 |