@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace unreal4u\TelegramAPI; |
| 6 | 6 | |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | |
| 71 | 71 | $this->requestHandler = $handler; |
| 72 | 72 | $this->formConstructor = new PostOptionsConstructor(); |
| 73 | - $this->apiUrl = 'https://api.telegram.org/bot' . $this->botToken . '/'; |
|
| 73 | + $this->apiUrl = 'https://api.telegram.org/bot'.$this->botToken.'/'; |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | /** |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $this->resetObjectValues(); |
| 85 | 85 | $option = $this->formConstructor->constructOptions($method); |
| 86 | 86 | return $this->sendRequestToTelegram($method, $option) |
| 87 | - ->then(function (TelegramResponse $response) use ($method) { |
|
| 87 | + ->then(function(TelegramResponse $response) use ($method) { |
|
| 88 | 88 | return $method::bindToObject($response, $this->logger); |
| 89 | 89 | }); |
| 90 | 90 | } |
@@ -97,11 +97,11 @@ discard block |
||
| 97 | 97 | public function downloadFile(File $file): PromiseInterface |
| 98 | 98 | { |
| 99 | 99 | $this->logger->debug('Downloading file async from Telegram, creating URL'); |
| 100 | - $url = 'https://api.telegram.org/file/bot' . $this->botToken . '/' . $file->file_path; |
|
| 100 | + $url = 'https://api.telegram.org/file/bot'.$this->botToken.'/'.$file->file_path; |
|
| 101 | 101 | $this->logger->debug('About to perform request to begin downloading file'); |
| 102 | 102 | |
| 103 | 103 | return $this->requestHandler->get($url)->then( |
| 104 | - function (TelegramResponse $rawData) { |
|
| 104 | + function(TelegramResponse $rawData) { |
|
| 105 | 105 | return new TelegramDocument($rawData); |
| 106 | 106 | } |
| 107 | 107 | ); |
@@ -147,6 +147,6 @@ discard block |
||
| 147 | 147 | $this->methodName = substr($completeClassName, strrpos($completeClassName, '\\') + 1); |
| 148 | 148 | $this->logger->info('About to perform API request', ['method' => $this->methodName]); |
| 149 | 149 | |
| 150 | - return $this->apiUrl . $this->methodName; |
|
| 150 | + return $this->apiUrl.$this->methodName; |
|
| 151 | 151 | } |
| 152 | 152 | } |