Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
36 | 2 | public function convert($command) |
|
37 | { |
||
38 | 2 | if (0 !== strpos($command, '/')) { |
|
39 | 1 | return new WebHook(['text' => $command] + $this->webHook); |
|
40 | } else { |
||
41 | 1 | list($command, $text) = explode(' ', $command, 2); |
|
42 | |||
43 | 1 | return new SlashCommand(['command' => $command, 'text' => $text] + $this->slashCommand); |
|
44 | } |
||
45 | } |
||
46 | } |
||
47 |