| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function getEvents(): array |
||
| 31 | { |
||
| 32 | $events = []; |
||
| 33 | if ($this->target[0] === '#') { |
||
| 34 | $events = [ |
||
| 35 | new Event('message', [$this->user, $this->channel, $this->message]), |
||
| 36 | new Event("message$this->target", [$this->user, $this->channel, $this->message]), |
||
| 37 | ]; |
||
| 38 | } else { |
||
| 39 | $events = [ |
||
| 40 | new Event('privmsg', [$this->user, $this->target, $this->message]), |
||
| 41 | ]; |
||
| 42 | } |
||
| 43 | |||
| 44 | return $events; |
||
| 45 | } |
||
| 54 |