diff --git a/src/MessageTrait.php b/src/MessageTrait.php index d1c568f..decec2b 100644 --- a/src/MessageTrait.php +++ b/src/MessageTrait.php @@ -36,7 +36,7 @@ trait MessageTrait * * @var string[] */ - private static array $supportedProtocolVersions = ['1.0', '1.1', '2.0', '2']; + private static array $supportedProtocolVersions = ['1.0', '1.1', '2.0', '2', '3.0', '3']; /** * Map of all registered original headers, as `original header name` => `array of values`. diff --git a/src/RequestTrait.php b/src/RequestTrait.php index 247920d..bd34459 100644 --- a/src/RequestTrait.php +++ b/src/RequestTrait.php @@ -131,7 +131,7 @@ public function getMethod(): string * @param string $method Case-sensitive method. * @return static * @throws InvalidArgumentException for invalid HTTP methods. - * @psalm-suppress DocblockTypeContradiction + * @psalm-suppress DocblockTypeContradiction, TypeDoesNotContainType, NoValue, RedundantCondition */ public function withMethod($method): RequestInterface { @@ -241,7 +241,7 @@ private function init( /** * @param UriInterface|string $uri * @throws InvalidArgumentException for invalid URI. - * @psalm-suppress RedundantConditionGivenDocblockType + * @psalm-suppress TypeDoesNotContainType, NoValue, RedundantCondition */ private function setUri($uri): void { @@ -265,6 +265,7 @@ private function setUri($uri): void * Updates `Host` header from the current URI and sets the `Host` first in the list of headers. * * @see https://tools.ietf.org/html/rfc7230#section-5.4 + * @psalm-suppress RiskyTruthyFalsyComparison */ private function updateHostHeaderFromUri(): void { diff --git a/src/ResponseTrait.php b/src/ResponseTrait.php index 6aaaf05..a8556c4 100644 --- a/src/ResponseTrait.php +++ b/src/ResponseTrait.php @@ -147,6 +147,7 @@ public function getStatusCode(): int * @psalm-suppress DocblockTypeContradiction * @psalm-suppress TypeDoesNotContainType * @psalm-suppress RedundantCondition + * @psalm-suppress InvalidCast * @psalm-suppress NoValue */ public function withStatus($code, $reasonPhrase = ''): ResponseInterface diff --git a/src/StreamTrait.php b/src/StreamTrait.php index 146c724..0dfb0e0 100644 --- a/src/StreamTrait.php +++ b/src/StreamTrait.php @@ -171,6 +171,7 @@ public function eof(): bool * Returns whether or not the stream is seekable. * * @return bool + * @psalm-suppress RiskyTruthyFalsyComparison */ public function isSeekable(): bool { @@ -363,6 +364,7 @@ public function getContents(): string * @return array|mixed|null Returns an associative array if no key is * provided. Returns a specific key value if a key is provided and the * value is found, or null if the key is not found. + * @psalm-suppress RiskyTruthyFalsyComparison */ public function getMetadata($key = null) { diff --git a/src/Uri.php b/src/Uri.php index 5d4dc0d..59f61d3 100644 --- a/src/Uri.php +++ b/src/Uri.php @@ -358,6 +358,7 @@ public function withFragment($fragment): UriInterface * @param string $scheme * @return string * @throws InvalidArgumentException for invalid or unsupported schemes. + * @psalm-suppress RiskyTruthyFalsyComparison */ private function normalizeScheme(string $scheme): string {