Lines
100.00%
1 / 1
Functions and Methods
100.00%
1 / 1
Classes and Traits
100.00%
1 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| MalformedEventException | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | 100.00% | 1 / 1 | |||
| __construct | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace Lorekeeper\Server\Exception; | |
| 6 | ||
| 7 | use Lorekeeper\Server\Event\Event; | |
| 8 | use RuntimeException; | |
| 9 | use Throwable; | |
| 10 | ||
| 11 | final class MalformedEventException extends RuntimeException | |
| 12 | { | |
| 13 | /** @param class-string<Event> $event */ | |
| 14 | public function __construct( | |
| 15 | public readonly string $event, | |
| 16 | string $reason, | |
| 17 | ?Throwable $previous = null, | |
| 18 | ) { | |
| 19 | parent::__construct("Malformed {$event}: {$reason}", previous: $previous); | |
| 20 | } | |
| 21 | } |