| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 47 | public function execute() |
||
| 48 | { |
||
| 49 | $message = $this->getMessage(); |
||
| 50 | $chat_id = $message->getChat()->getId(); |
||
| 51 | $text = trim($message->getText(true)); |
||
| 52 | |||
| 53 | if ($text === '') { |
||
| 54 | $text = 'Command usage: ' . $this->getUsage(); |
||
| 55 | } |
||
| 56 | |||
| 57 | $data = [ |
||
| 58 | 'chat_id' => $chat_id, |
||
| 59 | 'text' => $text, |
||
| 60 | ]; |
||
| 61 | |||
| 62 | return Request::sendMessage($data); |
||
| 63 | } |
||
| 64 | } |
||
| 65 |