|
@@ -86,7 +86,7 @@ discard block |
|
|
block discarded – undo |
|
86
|
86
|
$this->resetObjectValues(); |
|
87
|
87
|
$jsonDecoded = $this->sendRequestToTelegram($method, $this->constructFormData($method)); |
|
88
|
88
|
|
|
89
|
|
- $returnObject = 'unreal4u\\Telegram\\Types\\' . $method::bindToObjectType(); |
|
|
89
|
+ $returnObject = 'unreal4u\\Telegram\\Types\\'.$method::bindToObjectType(); |
|
90
|
90
|
$this->logger->debug(sprintf('Decoded response from server, instantiating new %s class', $returnObject)); |
|
91
|
91
|
return new $returnObject($jsonDecoded['result'], $this->logger); |
|
92
|
92
|
} |
|
@@ -103,7 +103,7 @@ discard block |
|
|
block discarded – undo |
|
103
|
103
|
public function downloadFile(File $file): TelegramDocument |
|
104
|
104
|
{ |
|
105
|
105
|
$this->logger->debug('Downloading file from Telegram, creating URI'); |
|
106
|
|
- $url = 'https://api.telegram.org/file/bot' . $this->botToken . '/' . $file->file_path; |
|
|
106
|
+ $url = 'https://api.telegram.org/file/bot'.$this->botToken.'/'.$file->file_path; |
|
107
|
107
|
$this->logger->debug('About to perform request'); |
|
108
|
108
|
return new TelegramDocument($this->httpClient->get($url)); |
|
109
|
109
|
} |
|
@@ -114,7 +114,7 @@ discard block |
|
|
block discarded – undo |
|
114
|
114
|
*/ |
|
115
|
115
|
final private function constructApiUrl(): TgLog |
|
116
|
116
|
{ |
|
117
|
|
- $this->apiUrl = 'https://api.telegram.org/bot' . $this->botToken . '/'; |
|
|
117
|
+ $this->apiUrl = 'https://api.telegram.org/bot'.$this->botToken.'/'; |
|
118
|
118
|
$this->logger->debug('Built up the API URL'); |
|
119
|
119
|
return $this; |
|
120
|
120
|
} |
|
@@ -215,7 +215,7 @@ discard block |
|
|
block discarded – undo |
|
215
|
215
|
$this->methodName = substr($completeClassName, strrpos($completeClassName, '\\') + 1); |
|
216
|
216
|
$this->logger->info('About to perform API request', ['method' => $this->methodName]); |
|
217
|
217
|
|
|
218
|
|
- return $this->apiUrl . $this->methodName; |
|
|
218
|
+ return $this->apiUrl.$this->methodName; |
|
219
|
219
|
} |
|
220
|
220
|
|
|
221
|
221
|
/** |