Lines
0.00%
0 / 4
Methods
0.00%
0 / 1
Classes
0.00%
0 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| messageTemplate | 0.00% | 0 / 4 | 0.00% | 0 / 1 | 20 | ||
| 7 | enum SelectorError: string implements ExceptionReason | |
| 8 | { | |
| 9 | case Empty = 'selector_empty'; | |
| 10 | case RegexInvalid = 'regex_invalid'; | |
| 11 | case MqttFilterInvalid = 'mqtt_filter_invalid'; | |
| 12 | ||
| 13 | public function messageTemplate(): string | |
| 14 | { | |
| 15 | return match ($this) { | |
| 16 | self::Empty => '{selectorKind} cannot be empty.', | |
| 17 | self::RegexInvalid => 'Regular expression selector {pattern} is invalid: {compileError}.', | |
| 18 | self::MqttFilterInvalid => 'MQTT topic filter {filter} must use + and # only as whole levels, with # last.', | |
| 19 | }; | |
| 20 | } | |
| 21 | } |