Test Failed
Push — master ( b3c701...0c9d2e )
by Alexpts
02:03
created
src/Request.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         $target = $target ?: '/';
55 55
 
56 56
         if ('' !== $this->uri->getQuery()) {
57
-            $target .= '?' . $this->uri->getQuery();
57
+            $target .= '?'.$this->uri->getQuery();
58 58
         }
59 59
 
60 60
         $this->requestTarget = $target;
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         }
110 110
 
111 111
         if (null !== ($port = $this->uri->getPort())) {
112
-            $host .= ':' . $port;
112
+            $host .= ':'.$port;
113 113
         }
114 114
 
115 115
         $this->headers['host'] = [$host];
Please login to merge, or discard this patch.
src/Stream.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -199,9 +199,9 @@
 block discarded – undo
199 199
         }
200 200
 
201 201
         if (-1 === fseek($this->stream, $offset, $whence)) {
202
-            throw new RuntimeException('Unable to seek to stream position ' .
203
-                $offset .
204
-                ' with whence ' .
202
+            throw new RuntimeException('Unable to seek to stream position '.
203
+                $offset.
204
+                ' with whence '.
205 205
                 \var_export($whence, true));
206 206
         }
207 207
     }
Please login to merge, or discard this patch.
src/Response/JsonResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 
43 43
     public function withBody(StreamInterface $body): Message
44 44
     {
45
-        $this->data = json_decode((string)$body, true, 512, JSON_THROW_ON_ERROR);
45
+        $this->data = json_decode((string) $body, true, 512, JSON_THROW_ON_ERROR);
46 46
         $this->isSyncBody = true;
47 47
         return parent::withBody($body);
48 48
     }
Please login to merge, or discard this patch.
src/Factory/Psr17Factory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,10 +59,10 @@
 block discarded – undo
59 59
         $resource = @fopen($filename, $mode);
60 60
         if (false === $resource) {
61 61
             if ('' === $mode || false === in_array($mode[0], ['r', 'w', 'a', 'x', 'c'])) {
62
-                throw new InvalidArgumentException('The mode ' . $mode . ' is invalid.');
62
+                throw new InvalidArgumentException('The mode '.$mode.' is invalid.');
63 63
             }
64 64
 
65
-            throw new RuntimeException('The file ' . $filename . ' cannot be opened.');
65
+            throw new RuntimeException('The file '.$filename.' cannot be opened.');
66 66
         }
67 67
 
68 68
         return Stream::create($resource);
Please login to merge, or discard this patch.
src/Factory/HttplugFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
         $body = null,
28 28
         $version = '1.1'
29 29
     ) {
30
-        return new Response((int)$statusCode, $headers, $body, $version, $reasonPhrase);
30
+        return new Response((int) $statusCode, $headers, $body, $version, $reasonPhrase);
31 31
     }
32 32
 
33 33
     public function createStream($body = null)
Please login to merge, or discard this patch.
src/Uri.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             $this->query = isset($parts['query']) ? $this->filterQueryAndFragment($parts['query']) : '';
44 44
             $this->fragment = isset($parts['fragment']) ? $this->filterQueryAndFragment($parts['fragment']) : '';
45 45
             if (isset($parts['pass'])) {
46
-                $this->userInfo .= ':' . $parts['pass'];
46
+                $this->userInfo .= ':'.$parts['pass'];
47 47
             }
48 48
         }
49 49
     }
@@ -66,11 +66,11 @@  discard block
 block discarded – undo
66 66
 
67 67
         $authority = $this->host;
68 68
         if ('' !== $this->userInfo) {
69
-            $authority = $this->userInfo . '@' . $authority;
69
+            $authority = $this->userInfo.'@'.$authority;
70 70
         }
71 71
 
72 72
         if (null !== $this->port) {
73
-            $authority .= ':' . $this->port;
73
+            $authority .= ':'.$this->port;
74 74
         }
75 75
 
76 76
         return $authority;
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     {
119 119
         $info = $user;
120 120
         if (null !== $password && '' !== $password) {
121
-            $info .= ':' . $password;
121
+            $info .= ':'.$password;
122 122
         }
123 123
 
124 124
         $this->userInfo = $info;
@@ -177,24 +177,24 @@  discard block
 block discarded – undo
177 177
     ): string {
178 178
         $uri = '';
179 179
         if ('' !== $scheme) {
180
-            $uri .= $scheme . ':';
180
+            $uri .= $scheme.':';
181 181
         }
182 182
 
183 183
         if ('' !== $authority) {
184
-            $uri .= '//' . $authority;
184
+            $uri .= '//'.$authority;
185 185
         }
186 186
 
187 187
         if ('' !== $path) {
188 188
             if ('/' !== $path[0]) {
189 189
                 if ('' !== $authority) {
190 190
                     // If the path is rootless and an authority is present, the path MUST be prefixed by "/"
191
-                    $path = '/' . $path;
191
+                    $path = '/'.$path;
192 192
                 }
193 193
             } elseif (isset($path[1]) && '/' === $path[1]) {
194 194
                 if ('' === $authority) {
195 195
                     // If the path is starting with more than one "/" and no authority is present, the
196 196
                     // starting slashes MUST be reduced to one.
197
-                    $path = '/' . \ltrim($path, '/');
197
+                    $path = '/'.\ltrim($path, '/');
198 198
                 }
199 199
             }
200 200
 
@@ -202,11 +202,11 @@  discard block
 block discarded – undo
202 202
         }
203 203
 
204 204
         if ('' !== $query) {
205
-            $uri .= '?' . $query;
205
+            $uri .= '?'.$query;
206 206
         }
207 207
 
208 208
         if ('' !== $fragment) {
209
-            $uri .= '#' . $fragment;
209
+            $uri .= '#'.$fragment;
210 210
         }
211 211
 
212 212
         return $uri;
@@ -232,9 +232,9 @@  discard block
 block discarded – undo
232 232
             throw new InvalidArgumentException('Path must be a string');
233 233
         }
234 234
 
235
-        return preg_replace_callback('/(?:[^' .
236
-            self::CHAR_UNRESERVED .
237
-            self::CHAR_SUB_DELIMS .
235
+        return preg_replace_callback('/(?:[^'.
236
+            self::CHAR_UNRESERVED.
237
+            self::CHAR_SUB_DELIMS.
238 238
             '%:@\/]++|%(?![A-Fa-f0-9]{2}))/', [__CLASS__, 'rawurlencodeMatchZero'], $path);
239 239
     }
240 240
 
@@ -244,9 +244,9 @@  discard block
 block discarded – undo
244 244
             throw new InvalidArgumentException('Query and fragment must be a string');
245 245
         }
246 246
 
247
-        return preg_replace_callback('/(?:[^' .
248
-            self::CHAR_UNRESERVED .
249
-            self::CHAR_SUB_DELIMS .
247
+        return preg_replace_callback('/(?:[^'.
248
+            self::CHAR_UNRESERVED.
249
+            self::CHAR_SUB_DELIMS.
250 250
             '%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', [__CLASS__, 'rawurlencodeMatchZero'], $str);
251 251
     }
252 252
 
Please login to merge, or discard this patch.
src/Message.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     public function withHeader($name, $value): self
64 64
     {
65 65
         $name = strtolower($name);
66
-        $value = array_map('trim', (array)$value);
66
+        $value = array_map('trim', (array) $value);
67 67
         $this->validateHeader($name, $value);
68 68
 
69 69
         $this->headers[$name] = $value;
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         }
111 111
 
112 112
         foreach ($values as $v) {
113
-            if (!is_string($v) || 1 !== preg_match("@^[ \x09\x21-\x7E\x80-\xFF]*$@", (string)$v)) {
113
+            if (!is_string($v) || 1 !== preg_match("@^[ \x09\x21-\x7E\x80-\xFF]*$@", (string) $v)) {
114 114
                 throw new InvalidArgumentException('Header values must be RFC 7230 compatible strings.');
115 115
             }
116 116
         }
@@ -127,15 +127,15 @@  discard block
 block discarded – undo
127 127
         $this->validateHeaders($headers);
128 128
 
129 129
         foreach ($headers as $name => $values) {
130
-            $values = (array)$values;
131
-            $name = strtolower((string)$name);
130
+            $values = (array) $values;
131
+            $name = strtolower((string) $name);
132 132
 
133 133
             if (!($this->headers[$name] ?? false)) {
134 134
                 $this->headers[$name] = [];
135 135
             }
136 136
 
137 137
             foreach ($values as &$value) {
138
-                $value = trim((string)$value);
138
+                $value = trim((string) $value);
139 139
             }
140 140
             $this->headers[$name] = [...$this->headers[$name], ...$values];
141 141
         }
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
     {
163 163
         $allValues = '';
164 164
         foreach ($headers as $values) {
165
-            foreach ((array)$values as $value) {
165
+            foreach ((array) $values as $value) {
166 166
                 $allValues .= $value;
167 167
             }
168 168
         }
Please login to merge, or discard this patch.