| 1 | <?php |
||
| 7 | class RegexFailed extends Exception |
||
| 8 | { |
||
| 9 | public static function match(string $pattern, string $subject, string $message): self |
||
| 15 | |||
| 16 | public static function replace(string $pattern, string $subject, string $message): self |
||
| 22 | |||
| 23 | public static function groupDoesntExist(string $pattern, string $subject, int $index): self |
||
| 27 | |||
| 28 | public static function namedGroupDoesntExist(string $pattern, string $subject, string $group): self |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param string $modifier |
||
| 35 | * |
||
| 36 | * @return RegexFailed |
||
| 37 | */ |
||
| 38 | public static function invalidModifier(string $modifier): self |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param string $delimiter |
||
| 45 | * |
||
| 46 | * @return RegexFailed |
||
| 47 | */ |
||
| 48 | public static function invalidDelimiter(string $delimiter): self |
||
| 52 | |||
| 53 | protected static function trimString(string $string): string |
||
| 61 | } |
||
| 62 |