Total Complexity | 5 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class PingMessage extends IrcMessage |
||
9 | { |
||
10 | public function __construct(string $message) |
||
11 | { |
||
12 | parent::__construct($message); |
||
13 | } |
||
14 | |||
15 | /** |
||
16 | * Reply the ping message with a pong response. |
||
17 | */ |
||
18 | public function handle(IrcClient $client, bool $force = false): void |
||
19 | { |
||
20 | if ($this->handled && !$force) { |
||
21 | return; |
||
22 | } |
||
23 | |||
24 | $client->send("PONG :$this->payload"); |
||
25 | } |
||
26 | |||
27 | public function getEventArgs(): array |
||
31 | ]; |
||
32 | } |
||
33 | } |
||
34 |