Test Failed
Branch master (cc711f)
by Alexpts
06:27
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   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@
 block discarded – undo
175 175
 		}
176 176
 
177 177
 		if (-1 === fseek($this->stream, $offset, $whence)) {
178
-			throw new RuntimeException('Unable to seek to stream position ' . $offset . ' with whence ' . \var_export($whence, true));
178
+			throw new RuntimeException('Unable to seek to stream position '.$offset.' with whence '.\var_export($whence, true));
179 179
 		}
180 180
 	}
181 181
 
Please login to merge, or discard this patch.
src/Message.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	public function withHeader($name, $value): self
60 60
 	{
61 61
 		$name = strtolower($name);
62
-		$this->headers[$name] = $this->validateAndTrimHeader($name, (array)$value);
62
+		$this->headers[$name] = $this->validateAndTrimHeader($name, (array) $value);
63 63
 		return $this;
64 64
 	}
65 65
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 				throw new InvalidArgumentException('Header values must be RFC 7230 compatible strings.');
109 109
 			}
110 110
 
111
-			$returnValues[] = trim((string)$v);
111
+			$returnValues[] = trim((string) $v);
112 112
 		}
113 113
 
114 114
 		return $returnValues;
@@ -123,15 +123,15 @@  discard block
 block discarded – undo
123 123
 	protected function setHeaders(array $headers): void
124 124
 	{
125 125
 		foreach ($headers as $name => $values) {
126
-			$values = (array)$values;
127
-			$name = strtolower((string)$name);
126
+			$values = (array) $values;
127
+			$name = strtolower((string) $name);
128 128
 
129 129
 			if (!$this->hasHeader($name)) {
130 130
 				$this->headers[$name] = [];
131 131
 			}
132 132
 
133 133
 			foreach ($values as $value) {
134
-				$value = $this->validateAndTrimHeader($name, (array)$value)[0];
134
+				$value = $this->validateAndTrimHeader($name, (array) $value)[0];
135 135
 				$this->headers[$name][] = $value;
136 136
 			}
137 137
 		}
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
@@ -57,10 +57,10 @@
 block discarded – undo
57 57
 		$resource = @fopen($filename, $mode);
58 58
 		if (false === $resource) {
59 59
 			if ('' === $mode || false === in_array($mode[0], ['r', 'w', 'a', 'x', 'c'])) {
60
-				throw new InvalidArgumentException('The mode ' . $mode . ' is invalid.');
60
+				throw new InvalidArgumentException('The mode '.$mode.' is invalid.');
61 61
 			}
62 62
 
63
-			throw new RuntimeException('The file ' . $filename . ' cannot be opened.');
63
+			throw new RuntimeException('The file '.$filename.' cannot be opened.');
64 64
 		}
65 65
 
66 66
 		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
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 
23 23
 	public function createResponse($statusCode = 200, $reasonPhrase = null, array $headers = [], $body = null, $version = '1.1')
24 24
 	{
25
-		return new Response((int)$statusCode, $headers, $body, $version, $reasonPhrase);
25
+		return new Response((int) $statusCode, $headers, $body, $version, $reasonPhrase);
26 26
 	}
27 27
 
28 28
 	public function createStream($body = null)
Please login to merge, or discard this patch.
src/Uri.php 1 patch
Spacing   +12 added lines, -12 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;
@@ -172,24 +172,24 @@  discard block
 block discarded – undo
172 172
 	{
173 173
 		$uri = '';
174 174
 		if ('' !== $scheme) {
175
-			$uri .= $scheme . ':';
175
+			$uri .= $scheme.':';
176 176
 		}
177 177
 
178 178
 		if ('' !== $authority) {
179
-			$uri .= '//' . $authority;
179
+			$uri .= '//'.$authority;
180 180
 		}
181 181
 
182 182
 		if ('' !== $path) {
183 183
 			if ('/' !== $path[0]) {
184 184
 				if ('' !== $authority) {
185 185
 					// If the path is rootless and an authority is present, the path MUST be prefixed by "/"
186
-					$path = '/' . $path;
186
+					$path = '/'.$path;
187 187
 				}
188 188
 			} elseif (isset($path[1]) && '/' === $path[1]) {
189 189
 				if ('' === $authority) {
190 190
 					// If the path is starting with more than one "/" and no authority is present, the
191 191
 					// starting slashes MUST be reduced to one.
192
-					$path = '/' . \ltrim($path, '/');
192
+					$path = '/'.\ltrim($path, '/');
193 193
 				}
194 194
 			}
195 195
 
@@ -197,11 +197,11 @@  discard block
 block discarded – undo
197 197
 		}
198 198
 
199 199
 		if ('' !== $query) {
200
-			$uri .= '?' . $query;
200
+			$uri .= '?'.$query;
201 201
 		}
202 202
 
203 203
 		if ('' !== $fragment) {
204
-			$uri .= '#' . $fragment;
204
+			$uri .= '#'.$fragment;
205 205
 		}
206 206
 
207 207
 		return $uri;
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 			throw new InvalidArgumentException('Path must be a string');
228 228
 		}
229 229
 
230
-		return preg_replace_callback('/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\/]++|%(?![A-Fa-f0-9]{2}))/', [__CLASS__, 'rawurlencodeMatchZero'], $path);
230
+		return preg_replace_callback('/(?:[^'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.'%:@\/]++|%(?![A-Fa-f0-9]{2}))/', [__CLASS__, 'rawurlencodeMatchZero'], $path);
231 231
 	}
232 232
 
233 233
 	private function filterQueryAndFragment($str): string
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 			throw new InvalidArgumentException('Query and fragment must be a string');
237 237
 		}
238 238
 
239
-		return preg_replace_callback('/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', [__CLASS__, 'rawurlencodeMatchZero'], $str);
239
+		return preg_replace_callback('/(?:[^'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.'%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', [__CLASS__, 'rawurlencodeMatchZero'], $str);
240 240
 	}
241 241
 
242 242
 	private static function rawUrlEncodeMatchZero(array $match): string
Please login to merge, or discard this patch.