Completed
Push — master ( 7dbde1...631665 )
by Camilo
11s
created
src/HttpClientRequestHandlerAmp.php 1 patch
Spacing   +3 added lines, -3 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
 
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 function reactAdapt(Promise $promise) {
20 20
     $deferred = new \React\Promise\Deferred();
21 21
 
22
-    $promise->onResolve(function ($error = null, $result = null) use ($deferred) {
22
+    $promise->onResolve(function($error = null, $result = null) use ($deferred) {
23 23
         if ($error) {
24 24
             $deferred->reject($error);
25 25
         } else {
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      * @return PromiseInterface
77 77
      */
78 78
     private function processRequest(Request $request) {
79
-        return reactAdapt(\Amp\call(function () use ($request) {
79
+        return reactAdapt(\Amp\call(function() use ($request) {
80 80
             /** @var Response $response */
81 81
             $response = yield $this->client->request($request);
82 82
 
Please login to merge, or discard this patch.
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
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
             });
95 95
     }
@@ -101,11 +101,11 @@  discard block
 block discarded – undo
101 101
      */
102 102
     public function downloadFile(File $file): PromiseInterface
103 103
     {
104
-        $url = 'https://api.telegram.org/file/bot' . $this->botToken . '/' . $file->file_path;
104
+        $url = 'https://api.telegram.org/file/bot'.$this->botToken.'/'.$file->file_path;
105 105
         $this->logger->debug('About to perform request to begin downloading file');
106 106
 
107 107
         return $this->requestHandler->get($url)->then(
108
-            function (TelegramResponse $rawData) {
108
+            function(TelegramResponse $rawData) {
109 109
                 return new TelegramDocument($rawData);
110 110
             }
111 111
         );
@@ -151,6 +151,6 @@  discard block
 block discarded – undo
151 151
         $this->methodName = substr($completeClassName, strrpos($completeClassName, '\\') + 1);
152 152
         $this->logger->info('About to perform API request', ['method' => $this->methodName]);
153 153
 
154
-        return $this->apiUrl . $this->methodName;
154
+        return $this->apiUrl.$this->methodName;
155 155
     }
156 156
 }
Please login to merge, or discard this patch.