Completed
Pull Request — master (#59)
by Rick
02:24
created
src/TgLog.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace unreal4u\TelegramAPI;
6 6
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
         $this->requestHandler = $handler;
73 73
         $this->formConstructor = new PostOptionsConstructor();
74
-        $this->apiUrl = 'https://api.telegram.org/bot' . $this->botToken . '/';
74
+        $this->apiUrl = 'https://api.telegram.org/bot'.$this->botToken.'/';
75 75
     }
76 76
 
77 77
     /**
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         $this->resetObjectValues();
86 86
         $option = $this->formConstructor->constructOptions($method);
87 87
         return $this->sendRequestToTelegram($method, $option)
88
-            ->then(function (TelegramResponse $response) use ($method) {
88
+            ->then(function(TelegramResponse $response) use ($method) {
89 89
                 return $method::bindToObject($response, $this->logger);
90 90
             });
91 91
     }
@@ -98,16 +98,16 @@  discard block
 block discarded – undo
98 98
     public function downloadFile(File $file): PromiseInterface
99 99
     {
100 100
         $this->logger->debug('Downloading file async from Telegram, creating URL');
101
-        $url = 'https://api.telegram.org/file/bot' . $this->botToken . '/' . $file->file_path;
101
+        $url = 'https://api.telegram.org/file/bot'.$this->botToken.'/'.$file->file_path;
102 102
         $this->logger->debug('About to perform request to begin downloading file');
103 103
 
104 104
         $deferred = new Deferred();
105 105
 
106 106
         $this->requestHandler->get($url)->then(
107
-            function (TelegramResponse $rawData) use ($deferred) {
107
+            function(TelegramResponse $rawData) use ($deferred) {
108 108
                 $deferred->resolve(new TelegramDocument($rawData));
109 109
             },
110
-            function (\Exception $exception) use ($deferred) {
110
+            function(\Exception $exception) use ($deferred) {
111 111
                 $deferred->reject($exception);
112 112
             }
113 113
         );
@@ -155,6 +155,6 @@  discard block
 block discarded – undo
155 155
         $this->methodName = substr($completeClassName, strrpos($completeClassName, '\\') + 1);
156 156
         $this->logger->info('About to perform API request', ['method' => $this->methodName]);
157 157
 
158
-        return $this->apiUrl . $this->methodName;
158
+        return $this->apiUrl.$this->methodName;
159 159
     }
160 160
 }
Please login to merge, or discard this patch.