@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $this->formType = 'multipart/form-data'; |
99 | 99 | foreach ($method->getLocalFiles() as $identifier => $localFile) { |
100 | 100 | if ($localFile instanceof InputFile) { |
101 | - $return[$identifier . '~' . $this->numberOfLocalFiles] = [ |
|
101 | + $return[$identifier.'~'.$this->numberOfLocalFiles] = [ |
|
102 | 102 | 'id' => $this->numberOfLocalFiles, |
103 | 103 | 'filename' => basename($localFile->path), |
104 | 104 | 'stream' => $localFile->getStream(), |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $body = $builder->buildAll(); |
125 | 125 | $completeRequest = [ |
126 | 126 | 'headers' => [ |
127 | - 'Content-Type' => 'multipart/form-data; boundary="' . $builder->getBoundary() . '"', |
|
127 | + 'Content-Type' => 'multipart/form-data; boundary="'.$builder->getBoundary().'"', |
|
128 | 128 | 'Content-Length' => strlen($body) |
129 | 129 | ], |
130 | 130 | 'body' => $body |
@@ -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 | /** |
@@ -87,9 +87,9 @@ discard block |
||
87 | 87 | $this->resetObjectValues(); |
88 | 88 | $option = $this->formConstructor->constructOptions($method); |
89 | 89 | return $this->sendRequestToTelegram($method, $option) |
90 | - ->then(function (TelegramResponse $response) use ($method) { |
|
90 | + ->then(function(TelegramResponse $response) use ($method) { |
|
91 | 91 | return $method::bindToObject($response, $this->logger); |
92 | - }, function ($error) { |
|
92 | + }, function($error) { |
|
93 | 93 | $this->logger->error($error); |
94 | 94 | throw $error; |
95 | 95 | }); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $this->logger->debug('About to perform request to begin downloading file'); |
107 | 107 | |
108 | 108 | return $this->requestHandler->get($fileUrl)->then( |
109 | - function (TelegramResponse $rawData) { |
|
109 | + function(TelegramResponse $rawData) { |
|
110 | 110 | return new TelegramDocument($rawData); |
111 | 111 | } |
112 | 112 | ); |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $this->methodName = substr($completeClassName, strrpos($completeClassName, '\\') + 1); |
155 | 155 | $this->logger->info('About to perform API request', ['method' => $this->methodName]); |
156 | 156 | |
157 | - return $this->apiUrl . $this->methodName; |
|
157 | + return $this->apiUrl.$this->methodName; |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | /** |
@@ -165,6 +165,6 @@ discard block |
||
165 | 165 | */ |
166 | 166 | public function fileUrl(File $file): string |
167 | 167 | { |
168 | - return 'https://api.telegram.org/file/bot' . $this->botToken . '/' . $file->file_path; |
|
168 | + return 'https://api.telegram.org/file/bot'.$this->botToken.'/'.$file->file_path; |
|
169 | 169 | } |
170 | 170 | } |