Completed
Pull Request — master (#150)
by
unknown
09:26
created
src/Telegram/Methods/LogOut.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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\Telegram\Methods;
6 6
 
Please login to merge, or discard this patch.
src/Telegram/Types/ChatLocation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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\Telegram\Types;
6 6
 
Please login to merge, or discard this patch.
src/Telegram/Methods/UnpinAllChatMessages.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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\Telegram\Methods;
6 6
 
Please login to merge, or discard this patch.
src/Telegram/Types/ProximityAlertTriggered.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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\Telegram\Types;
6 6
 
Please login to merge, or discard this patch.
src/HttpClientRequestHandler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,14 +84,14 @@
 block discarded – undo
84 84
     {
85 85
         return $request->then(
86 86
             // Promise fulfilled
87
-            static function (ResponseInterface $response) {
87
+            static function(ResponseInterface $response) {
88 88
                 return new TelegramResponse(
89 89
                     $response->getBody()->getContents(),
90 90
                     $response->getHeaders()
91 91
                 );
92 92
             },
93 93
             // Promise rejected
94
-            static function (Exception $e) {
94
+            static function(Exception $e) {
95 95
                 if ($e instanceof ResponseException) {
96 96
                     throw ClientException::fromResponseException($e);
97 97
                 }
Please login to merge, or discard this patch.
src/InternalFunctionality/PostOptionsConstructor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
src/TgLog.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -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
                 throw $error;
95 95
             });
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Telegram/Types/Message.php 1 patch
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -95,15 +95,15 @@  discard block
 block discarded – undo
95 95
      */
96 96
     public $forward_date = 0;
97 97
 
98
-	/**
99
-	 * Optional. True, if the message is sent to a forum topic
100
-	 */
101
-	public $is_topic_message = false;
98
+ /**
99
+  * Optional. True, if the message is sent to a forum topic
100
+  */
101
+ public $is_topic_message = false;
102 102
 
103
-	/**
104
-	 * @var bool
105
-	 */
106
-	public $is_automatic_forward = false;
103
+ /**
104
+  * @var bool
105
+  */
106
+ public $is_automatic_forward = false;
107 107
 
108 108
     /**
109 109
      * Optional. For replies, the original message. Note that the Message object in this field will not contain further
@@ -359,29 +359,29 @@  discard block
 block discarded – undo
359 359
      */
360 360
     public $proximity_alert_triggered;
361 361
 
362
-	/**
363
-     * Optional. Service message: forum topic created
364
-	 * @var ForumTopicCreated
365
-	 */
366
-	public $forum_topic_created;
367
-
368
-	/**
369
-     * Optional. Service message: forum topic edited
370
-	 * @var ForumTopicEdited
371
-	 */
372
-	public $forum_topic_edited;
373
-
374
-	/**
375
-     * Optional. Service message: forum topic closed
376
-	 * @var ForumTopicClosed
377
-	 */
378
-	public $forum_topic_closed;
379
-
380
-	/**
381
-     * Optional. Service message: forum topic reopened
382
-	 * @var ForumTopicReopened
383
-	 */
384
-	public $forum_topic_reopened;
362
+ /**
363
+  * Optional. Service message: forum topic created
364
+  * @var ForumTopicCreated
365
+  */
366
+ public $forum_topic_created;
367
+
368
+ /**
369
+  * Optional. Service message: forum topic edited
370
+  * @var ForumTopicEdited
371
+  */
372
+ public $forum_topic_edited;
373
+
374
+ /**
375
+  * Optional. Service message: forum topic closed
376
+  * @var ForumTopicClosed
377
+  */
378
+ public $forum_topic_closed;
379
+
380
+ /**
381
+  * Optional. Service message: forum topic reopened
382
+  * @var ForumTopicReopened
383
+  */
384
+ public $forum_topic_reopened;
385 385
 
386 386
     /**
387 387
      * @var Markup
Please login to merge, or discard this patch.