Completed
Push — master ( 5bf22f...cf1632 )
by Kirill
06:39
created
src/Adapters/HttpAdapter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of GitterApi package.
4 4
  *
@@ -79,13 +79,13 @@  discard block
 block discarded – undo
79 79
         $options = $this->prepareRequestOptions($route);
80 80
 
81 81
         // Log request
82
-        $this->client->log(' -> ' . $method . ' ' . $uri . "\n body: " . ($options['body'] ?? ''), Logger::DEBUG);
82
+        $this->client->log(' -> '.$method.' '.$uri."\n body: ".($options['body'] ?? ''), Logger::DEBUG);
83 83
 
84 84
         $response = $this->guzzle->request($method, $uri, $options);
85 85
 
86 86
         // Log response
87
-        $this->client->log(' <- ' . $response->getStatusCode() . ' ' . $response->getReasonPhrase(), Logger::DEBUG);
88
-        $this->client->log('   <- ' . (string)$response->getBody(), Logger::DEBUG);
87
+        $this->client->log(' <- '.$response->getStatusCode().' '.$response->getReasonPhrase(), Logger::DEBUG);
88
+        $this->client->log('   <- '.(string) $response->getBody(), Logger::DEBUG);
89 89
 
90 90
         return $this->parseResponse($response);
91 91
     }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      */
113 113
     private function parseResponse(ResponseInterface $response): array
114 114
     {
115
-        $data = json_decode((string)$response->getBody(), true);
115
+        $data = json_decode((string) $response->getBody(), true);
116 116
 
117 117
         if (json_last_error() !== JSON_ERROR_NONE) {
118 118
             throw new \RuntimeException(json_last_error_msg());
Please login to merge, or discard this patch.
src/Resources/ResourceInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of GitterApi package.
4 4
  *
Please login to merge, or discard this patch.
src/Resources/Messages.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of GitterApi package.
4 4
  *
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     {
80 80
         return $this->fetch(
81 81
             Route::get('rooms/{roomId}/chatMessages/{messageId}')
82
-                ->withMany([ 'roomId' => $roomId, 'messageId' => $messageId ])
82
+                ->withMany(['roomId' => $roomId, 'messageId' => $messageId])
83 83
         );
84 84
     }
85 85
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     {
112 112
         return $this->fetch(
113 113
             Route::put('rooms/{roomId}/chatMessages/{messageId}')
114
-                ->withMany([ 'roomId' => $roomId, 'messageId' => $messageId ])
114
+                ->withMany(['roomId' => $roomId, 'messageId' => $messageId])
115 115
                 ->withBody('text', $content)
116 116
         );
117 117
     }
Please login to merge, or discard this patch.
src/Resources/Rooms.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of GitterApi package.
4 4
  *
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 
272 272
             yield from $response = $this->fetch($route);
273 273
 
274
-        } while(count($response) >= $limit && ($skip += $limit));
274
+        } while (count($response) >= $limit && ($skip += $limit));
275 275
     }
276 276
 
277 277
     /**
Please login to merge, or discard this patch.
src/Resources/Groups.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of GitterApi package.
4 4
  *
Please login to merge, or discard this patch.
src/Resources/AbstractResource.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of GitterApi package.
4 4
  *
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     protected function fetch(Route $route): array
52 52
     {
53
-        return (array)$this->viaHttp()->request($route);
53
+        return (array) $this->viaHttp()->request($route);
54 54
     }
55 55
 
56 56
     /**
Please login to merge, or discard this patch.
src/Resources/Users.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of GitterApi package.
4 4
  *
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function currentUserId(): string
57 57
     {
58
-        return (string)$this->current()['id'];
58
+        return (string) $this->current()['id'];
59 59
     }
60 60
 
61 61
     /**
Please login to merge, or discard this patch.