Conditions | 3 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
13 | public function handle() |
||
14 | { |
||
15 | $text = \strtolower($this->getUpdate()->getMessage()->getText()); |
||
16 | |||
17 | if ((strpos($text, 'hi') !== false) || (strpos($text, 'hello') !== false)) { |
||
18 | $this->replyWithMessage(['text' => "Hi, {$this->getUpdate()->getMessage()->getFrom()->getFirstName()}!"]); |
||
19 | |||
20 | $this |
||
21 | ->getUpdate() |
||
22 | ->getMessage() |
||
23 | ->getFrom() |
||
24 | ->setCurrentConversation( |
||
25 | LeaveMeAloneConversation::class |
||
26 | ); |
||
27 | } |
||
28 | } |
||
29 | } |
||
30 |