| @@ -85,6 +85,9 @@ discard block | ||
| 85 | 85 | } | 
| 86 | 86 | } | 
| 87 | 87 | |
| 88 | + /** | |
| 89 | + * @param integer $error | |
| 90 | + */ | |
| 88 | 91 | private function setError($error): void | 
| 89 | 92 |      { | 
| 90 | 93 |          if (false === \is_int($error)) { | 
| @@ -98,6 +101,9 @@ discard block | ||
| 98 | 101 | $this->error = $error; | 
| 99 | 102 | } | 
| 100 | 103 | |
| 104 | + /** | |
| 105 | + * @param integer $size | |
| 106 | + */ | |
| 101 | 107 | private function setSize($size): void | 
| 102 | 108 |      { | 
| 103 | 109 |          if (false === \is_int($size)) { | 
| @@ -107,6 +113,9 @@ discard block | ||
| 107 | 113 | $this->size = $size; | 
| 108 | 114 | } | 
| 109 | 115 | |
| 116 | + /** | |
| 117 | + * @param string|null $clientFilename | |
| 118 | + */ | |
| 110 | 119 | private function setClientFilename($clientFilename): void | 
| 111 | 120 |      { | 
| 112 | 121 |          if ($clientFilename !== null && !\is_string($clientFilename)) { | 
| @@ -116,6 +125,9 @@ discard block | ||
| 116 | 125 | $this->clientFilename = $clientFilename; | 
| 117 | 126 | } | 
| 118 | 127 | |
| 128 | + /** | |
| 129 | + * @param string|null $clientMediaType | |
| 130 | + */ | |
| 119 | 131 | private function setClientMediaType($clientMediaType): void | 
| 120 | 132 |      { | 
| 121 | 133 |          if ($clientMediaType !== null && !\is_string($clientMediaType)) { | 
| @@ -210,8 +222,8 @@ discard block | ||
| 210 | 222 | * | 
| 211 | 223 | * @author Michael Dowling and contributors to guzzlehttp/psr7 | 
| 212 | 224 | * | 
| 213 | - * @param StreamInterface $source Stream to read from | |
| 214 | - * @param StreamInterface $dest Stream to write to | |
| 225 | + * @param \Psr\Http\Message\StreamInterface $source Stream to read from | |
| 226 | + * @param \Psr\Http\Message\StreamInterface $dest Stream to write to | |
| 215 | 227 | * @param int $maxLen Maximum number of bytes to read. Pass -1 | 
| 216 | 228 | * to read the entire stream | 
| 217 | 229 | * | 
| @@ -73,11 +73,11 @@ discard block | ||
| 73 | 73 | |
| 74 | 74 | $authority = $this->host; | 
| 75 | 75 |          if ('' !== $this->userInfo) { | 
| 76 | - $authority = $this->userInfo . '@' . $authority; | |
| 76 | + $authority = $this->userInfo.'@'.$authority; | |
| 77 | 77 | } | 
| 78 | 78 | |
| 79 | 79 |          if (null !== $this->port) { | 
| 80 | - $authority .= ':' . $this->port; | |
| 80 | + $authority .= ':'.$this->port; | |
| 81 | 81 | } | 
| 82 | 82 | |
| 83 | 83 | return $authority; | 
| @@ -134,7 +134,7 @@ discard block | ||
| 134 | 134 |      { | 
| 135 | 135 | $info = $user; | 
| 136 | 136 |          if (null !== $password && '' !== $password) { | 
| 137 | - $info .= ':' . $password; | |
| 137 | + $info .= ':'.$password; | |
| 138 | 138 | } | 
| 139 | 139 | |
| 140 | 140 |          if ($this->userInfo === $info) { | 
| @@ -226,7 +226,7 @@ discard block | ||
| 226 | 226 | $this->query = isset($parts['query']) ? $this->filterQueryAndFragment($parts['query']) : ''; | 
| 227 | 227 | $this->fragment = isset($parts['fragment']) ? $this->filterQueryAndFragment($parts['fragment']) : ''; | 
| 228 | 228 |          if (isset($parts['pass'])) { | 
| 229 | - $this->userInfo .= ':' . $parts['pass']; | |
| 229 | + $this->userInfo .= ':'.$parts['pass']; | |
| 230 | 230 | } | 
| 231 | 231 | } | 
| 232 | 232 | |
| @@ -237,24 +237,24 @@ discard block | ||
| 237 | 237 |      { | 
| 238 | 238 | $uri = ''; | 
| 239 | 239 |          if ('' !== $scheme) { | 
| 240 | - $uri .= $scheme . ':'; | |
| 240 | + $uri .= $scheme.':'; | |
| 241 | 241 | } | 
| 242 | 242 | |
| 243 | 243 |          if ('' !== $authority) { | 
| 244 | - $uri .= '//' . $authority; | |
| 244 | + $uri .= '//'.$authority; | |
| 245 | 245 | } | 
| 246 | 246 | |
| 247 | 247 |          if ('' !== $path) { | 
| 248 | 248 |              if ('/' !== $path[0]) { | 
| 249 | 249 |                  if ('' !== $authority) { | 
| 250 | 250 | // If the path is rootless and an authority is present, the path MUST be prefixed by "/" | 
| 251 | - $path = '/' . $path; | |
| 251 | + $path = '/'.$path; | |
| 252 | 252 | } | 
| 253 | 253 |              } elseif (isset($path[1]) && '/' === $path[1]) { | 
| 254 | 254 |                  if ('' === $authority) { | 
| 255 | 255 | // If the path is starting with more than one "/" and no authority is present, the | 
| 256 | 256 | // starting slashes MUST be reduced to one. | 
| 257 | - $path = '/' . \ltrim($path, '/'); | |
| 257 | + $path = '/'.\ltrim($path, '/'); | |
| 258 | 258 | } | 
| 259 | 259 | } | 
| 260 | 260 | |
| @@ -262,11 +262,11 @@ discard block | ||
| 262 | 262 | } | 
| 263 | 263 | |
| 264 | 264 |          if ('' !== $query) { | 
| 265 | - $uri .= '?' . $query; | |
| 265 | + $uri .= '?'.$query; | |
| 266 | 266 | } | 
| 267 | 267 | |
| 268 | 268 |          if ('' !== $fragment) { | 
| 269 | - $uri .= '#' . $fragment; | |
| 269 | + $uri .= '#'.$fragment; | |
| 270 | 270 | } | 
| 271 | 271 | |
| 272 | 272 | return $uri; | 
| @@ -286,7 +286,7 @@ discard block | ||
| 286 | 286 | return null; | 
| 287 | 287 | } | 
| 288 | 288 | |
| 289 | - $port = (int)$port; | |
| 289 | + $port = (int) $port; | |
| 290 | 290 |          if (1 > $port || 0xffff < $port) { | 
| 291 | 291 |              throw new \InvalidArgumentException(\sprintf('Invalid port: %d. Must be between 1 and 65535', $port)); | 
| 292 | 292 | } | 
| @@ -300,7 +300,7 @@ discard block | ||
| 300 | 300 |              throw new \InvalidArgumentException('Path must be a string'); | 
| 301 | 301 | } | 
| 302 | 302 | |
| 303 | -        return \preg_replace_callback('/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\/]++|%(?![A-Fa-f0-9]{2}))/', [__CLASS__, 'rawurlencodeMatchZero'], $path); | |
| 303 | +        return \preg_replace_callback('/(?:[^'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.'%:@\/]++|%(?![A-Fa-f0-9]{2}))/', [__CLASS__, 'rawurlencodeMatchZero'], $path); | |
| 304 | 304 | } | 
| 305 | 305 | |
| 306 | 306 | private function filterQueryAndFragment($str): string | 
| @@ -309,7 +309,7 @@ discard block | ||
| 309 | 309 |              throw new \InvalidArgumentException('Query and fragment must be a string'); | 
| 310 | 310 | } | 
| 311 | 311 | |
| 312 | -        return \preg_replace_callback('/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', [__CLASS__, 'rawurlencodeMatchZero'], $str); | |
| 312 | +        return \preg_replace_callback('/(?:[^'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.'%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', [__CLASS__, 'rawurlencodeMatchZero'], $str); | |
| 313 | 313 | } | 
| 314 | 314 | |
| 315 | 315 | private static function rawurlencodeMatchZero(array $match): string |