Lines
100.00%
4 / 4
Methods
100.00%
2 / 2
Classes
100.00%
1 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| noParserFound | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| withSender | 100.00% | 3 / 3 | 100.00% | 1 / 1 | 2 | ||
| 10 | final class UnsupportedBankException extends ParseException | |
| 11 | { | |
| 12 | public static function noParserFound(): self | |
| 13 | { | |
| 14 | return new self('No parser found that supports this email format. The email may be from an unsupported bank or have an unrecognized format.'); | |
| 15 | } | |
| 16 | ||
| 17 | public static function withSender(?string $sender): self | |
| 18 | { | |
| 19 | if ($sender !== null) { | |
| 20 | return new self('No parser found for the supplied sender.'); | |
| 21 | } | |
| 22 | ||
| 23 | return self::noParserFound(); | |
| 24 | } | |
| 25 | } |