Total Complexity | 6 |
Total Lines | 54 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class IrcMessage |
||
8 | { |
||
9 | /** @var string */ |
||
10 | private $rawMessage; |
||
11 | |||
12 | /** @var string */ |
||
13 | public $command; |
||
14 | |||
15 | /** @var string */ |
||
16 | public $commandsuffix; |
||
17 | |||
18 | /** @var bool */ |
||
19 | protected $handled; |
||
20 | |||
21 | /** @var string */ |
||
22 | public $payload; |
||
23 | |||
24 | /** @var string */ |
||
25 | public $source; |
||
26 | |||
27 | public function __construct(string $message) |
||
37 | } |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * Get the raw message line. |
||
42 | * |
||
43 | * @return string |
||
44 | */ |
||
45 | public function getRaw(): string |
||
46 | { |
||
47 | return $this->rawMessage; |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * This function is always called after the message is parsed. |
||
52 | * The handle will only be executed once unless forced. |
||
53 | * |
||
54 | * @param IrcClient $client A reference to the irc client object |
||
55 | * @param bool $force Force handling this message even if already handled. |
||
56 | */ |
||
57 | public function handle(IrcClient $client, bool $force = false): void |
||
61 | } |
||
62 | } |
||
64 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.