Lines
100.00%
3 / 3
Functions and Methods
100.00%
3 / 3
Classes and Traits
100.00%
1 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ActionTooSoonEvent | 100.00% | 3 / 3 | 100.00% | 3 / 3 | 3 | 100.00% | 1 / 1 | |||
| channel | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | |||||
| phrase | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | |||||
| summary | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace Lorekeeper\Server\Event; | |
| 6 | ||
| 7 | use Override; | |
| 8 | ||
| 9 | /** | |
| 10 | * The server refused the last command because it came too quickly after the previous one. | |
| 11 | * | |
| 12 | * The command is dropped, not queued, so it has to be sent again after a short pause. | |
| 13 | * | |
| 14 | */ | |
| 15 | final readonly class ActionTooSoonEvent extends NoticeEvent | |
| 16 | { | |
| 17 | #[Override] | |
| 18 | protected static function channel(): string | |
| 19 | { | |
| 20 | return 'warning'; | |
| 21 | } | |
| 22 | ||
| 23 | #[Override] | |
| 24 | protected static function phrase(): string | |
| 25 | { | |
| 26 | return 'last action was too soon'; | |
| 27 | } | |
| 28 | ||
| 29 | #[Override] | |
| 30 | public function summary(): string | |
| 31 | { | |
| 32 | return 'Action too soon'; | |
| 33 | } | |
| 34 | } |