Passed
Branch master (9fde9d)
by Anatoly
02:46
created
Category
src/RequestFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 	 */
33 33
 	public function createRequest(string $method, $uri) : RequestInterface
34 34
 	{
35
-		if (! ($uri instanceof UriInterface))
35
+		if (!($uri instanceof UriInterface))
36 36
 		{
37 37
 			$uri = new Uri($uri);
38 38
 		}
Please login to merge, or discard this patch.
src/Response.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public function validateStatusCode(int $statusCode) : void
89 89
 	{
90
-		if (! ($statusCode >= 100 && $statusCode <= 599))
90
+		if (!($statusCode >= 100 && $statusCode <= 599))
91 91
 		{
92 92
 			throw new Exception\InvalidArgumentException(
93 93
 				\sprintf('The given status-code "%d" is not valid', $statusCode)
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	 */
107 107
 	public function validateReasonPhrase(string $reasonPhrase) : void
108 108
 	{
109
-		if (! \preg_match(RFC7230_FIELD_VALUE, $reasonPhrase))
109
+		if (!\preg_match(RFC7230_FIELD_VALUE, $reasonPhrase))
110 110
 		{
111 111
 			throw new Exception\InvalidArgumentException(
112 112
 				\sprintf('The given reason-phrase "%s" is not valid', $reasonPhrase)
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
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	{
85 85
 		$name = \strtolower($name);
86 86
 
87
-		return ! empty($this->headers[$name]);
87
+		return !empty($this->headers[$name]);
88 88
 	}
89 89
 
90 90
 	/**
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 		$this->validateHeaderName($name);
147 147
 		$this->validateHeaderValues($value);
148 148
 
149
-		if (! empty($this->headers[$name]))
149
+		if (!empty($this->headers[$name]))
150 150
 		{
151 151
 			$value = \array_merge($this->headers[$name], $value);
152 152
 		}
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 	 */
207 207
 	protected function validateProtocolVersion(string $protocolVersion) : void
208 208
 	{
209
-		if (! \preg_match('/^\d(?:\.\d)?$/', $protocolVersion))
209
+		if (!\preg_match('/^\d(?:\.\d)?$/', $protocolVersion))
210 210
 		{
211 211
 			throw new Exception\InvalidArgumentException(
212 212
 				\sprintf('The given protocol version "%s" is not valid', $protocolVersion)
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 	 */
228 228
 	protected function validateHeaderName(string $headerName) : void
229 229
 	{
230
-		if (! \preg_match(RFC7230_TOKEN, $headerName))
230
+		if (!\preg_match(RFC7230_TOKEN, $headerName))
231 231
 		{
232 232
 			throw new Exception\InvalidArgumentException(
233 233
 				\sprintf('The given header name "%s" is not valid', $headerName)
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 	 */
249 249
 	protected function validateHeaderValue(string $headerValue) : void
250 250
 	{
251
-		if (! \preg_match(RFC7230_FIELD_VALUE, $headerValue))
251
+		if (!\preg_match(RFC7230_FIELD_VALUE, $headerValue))
252 252
 		{
253 253
 			throw new Exception\InvalidArgumentException(
254 254
 				\sprintf('The given header value "%s" is not valid', $headerValue)
Please login to merge, or discard this patch.
src/Request.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -74,12 +74,12 @@  discard block
 block discarded – undo
74 74
 	 */
75 75
 	public function getRequestTarget() : string
76 76
 	{
77
-		if (! (null === $this->requestTarget))
77
+		if (!(null === $this->requestTarget))
78 78
 		{
79 79
 			return $this->requestTarget;
80 80
 		}
81 81
 
82
-		if (! ($this->uri instanceof UriInterface))
82
+		if (!($this->uri instanceof UriInterface))
83 83
 		{
84 84
 			return '/';
85 85
 		}
@@ -89,14 +89,14 @@  discard block
 block discarded – undo
89 89
 		//
90 90
 		// origin-form = absolute-path [ "?" query ]
91 91
 		// absolute-path = 1*( "/" segment )
92
-		if (! (0 === \strncmp($this->uri->getPath(), '/', 1)))
92
+		if (!(0 === \strncmp($this->uri->getPath(), '/', 1)))
93 93
 		{
94 94
 			return '/';
95 95
 		}
96 96
 
97 97
 		$origin = $this->uri->getPath();
98 98
 
99
-		if (! ('' === $this->uri->getQuery()))
99
+		if (!('' === $this->uri->getQuery()))
100 100
 		{
101 101
 			$origin .= '?' . $this->uri->getQuery();
102 102
 		}
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
 		$newhost = $uri->getHost();
144 144
 
145
-		if (! (null === $uri->getPort()))
145
+		if (!(null === $uri->getPort()))
146 146
 		{
147 147
 			$newhost .= ':' . $uri->getPort();
148 148
 		}
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 	 */
165 165
 	protected function validateMethod(string $method) : void
166 166
 	{
167
-		if (! \preg_match(RFC7230_TOKEN, $method))
167
+		if (!\preg_match(RFC7230_TOKEN, $method))
168 168
 		{
169 169
 			throw new Exception\InvalidArgumentException(
170 170
 				\sprintf('The given method "%s" is not valid', $method)
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 		// Safe field-value chars without whitespace
189 189
 		$regex = '/^[\x21-\x7E\x80-\xFF]+$/';
190 190
 
191
-		if (! \preg_match($regex, $requestTarget))
191
+		if (!\preg_match($regex, $requestTarget))
192 192
 		{
193 193
 			throw new Exception\InvalidArgumentException(
194 194
 				\sprintf('The given request-target "%s" is not valid', $requestTarget)
Please login to merge, or discard this patch.