@@ -107,6 +107,10 @@ |
||
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | |
| 110 | + /** |
|
| 111 | + * @param string $command |
|
| 112 | + * @param string $params |
|
| 113 | + */ |
|
| 110 | 114 | private function assembleUri($command, $params) :string { |
| 111 | 115 | return sprintf( |
| 112 | 116 | 'https://api.telegram.org/bot%s/%s%s', |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | * @param string $message |
| 82 | 82 | */ |
| 83 | 83 | public function getResponder($message) { |
| 84 | - return function ($text) use($message){ |
|
| 84 | + return function($text) use($message){ |
|
| 85 | 85 | $this->sendResponse($text, $message); |
| 86 | 86 | }; |
| 87 | 87 | } |
@@ -42,11 +42,11 @@ |
||
| 42 | 42 | $counter = 0; |
| 43 | 43 | $bot->setClient($this->client); |
| 44 | 44 | |
| 45 | - $this->loop->addPeriodicTimer(2, function (\React\EventLoop\Timer\Timer $timer) use ($bot, $times, &$counter) { |
|
| 45 | + $this->loop->addPeriodicTimer(2, function(\React\EventLoop\Timer\Timer $timer) use ($bot, $times, &$counter) { |
|
| 46 | 46 | |
| 47 | 47 | $bot->poll(); |
| 48 | 48 | |
| 49 | - if ( $times && $times >= $counter) { |
|
| 49 | + if ($times && $times >= $counter) { |
|
| 50 | 50 | $this->loop->cancelTimer($timer); |
| 51 | 51 | } |
| 52 | 52 | }); |