diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index ab8266fc..c159f369 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -205,16 +205,6 @@ parameters: count: 1 path: src/NoSeekStream.php - - - message: "#^Parameter \\#1 \\$string of function strlen expects string, mixed given\\.$#" - count: 1 - path: src/PumpStream.php - - - - message: "#^Parameter \\#1 \\$string of method GuzzleHttp\\\\Psr7\\\\BufferStream\\:\\:write\\(\\) expects string, mixed given\\.$#" - count: 1 - path: src/PumpStream.php - - message: "#^Unreachable statement \\- code above always terminates\\.$#" count: 1 @@ -311,7 +301,7 @@ parameters: path: src/Utils.php - - message: "#^Parameter \\#1 \\$source of class GuzzleHttp\\\\Psr7\\\\PumpStream constructor expects callable\\(int\\)\\: string\\|false\\|null, Closure\\(\\)\\: mixed given\\.$#" + message: "#^Parameter \\#1 \\$source of class GuzzleHttp\\\\Psr7\\\\PumpStream constructor expects callable\\(int\\)\\: \\(string\\|false\\|null\\), Closure\\(\\)\\: mixed given\\.$#" count: 1 path: src/Utils.php diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 50614a5c..37b37e8b 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + _fn___toString)]]> diff --git a/src/AppendStream.php b/src/AppendStream.php index 8361564b..ee8f3788 100644 --- a/src/AppendStream.php +++ b/src/AppendStream.php @@ -140,9 +140,9 @@ public function getSize(): ?int public function eof(): bool { - return !$this->streams || - ($this->current >= count($this->streams) - 1 && - $this->streams[$this->current]->eof()); + return !$this->streams + || ($this->current >= count($this->streams) - 1 + && $this->streams[$this->current]->eof()); } public function rewind(): void @@ -239,8 +239,6 @@ public function write($string): int } /** - * {@inheritdoc} - * * @return mixed */ public function getMetadata($key = null) diff --git a/src/BufferStream.php b/src/BufferStream.php index 21be8c0a..2b0eb77b 100644 --- a/src/BufferStream.php +++ b/src/BufferStream.php @@ -134,8 +134,6 @@ public function write($string): int } /** - * {@inheritdoc} - * * @return mixed */ public function getMetadata($key = null) diff --git a/src/FnStream.php b/src/FnStream.php index 312b80ec..9fdddb9c 100644 --- a/src/FnStream.php +++ b/src/FnStream.php @@ -170,8 +170,6 @@ public function getContents(): string } /** - * {@inheritdoc} - * * @return mixed */ public function getMetadata($key = null) diff --git a/src/PumpStream.php b/src/PumpStream.php index b52341d9..5585190c 100644 --- a/src/PumpStream.php +++ b/src/PumpStream.php @@ -34,7 +34,7 @@ final class PumpStream implements StreamInterface private $buffer; /** - * @param callable(int): (string|null|false) $source Source of the stream data. The callable MAY + * @param callable(int): (string|false|null) $source Source of the stream data. The callable MAY * accept an integer argument used to control the * amount of data to return. The callable MUST * return a string when called, or false|null on error @@ -150,8 +150,6 @@ public function getContents(): string } /** - * {@inheritdoc} - * * @return mixed */ public function getMetadata($key = null) diff --git a/src/ServerRequest.php b/src/ServerRequest.php index 1198ff63..c852d96f 100644 --- a/src/ServerRequest.php +++ b/src/ServerRequest.php @@ -286,8 +286,6 @@ public function withQueryParams(array $query): ServerRequestInterface } /** - * {@inheritdoc} - * * @return array|object|null */ public function getParsedBody() @@ -309,8 +307,6 @@ public function getAttributes(): array } /** - * {@inheritdoc} - * * @return mixed */ public function getAttribute($attribute, $default = null) diff --git a/src/Stream.php b/src/Stream.php index c2477fe3..f730ddac 100644 --- a/src/Stream.php +++ b/src/Stream.php @@ -264,8 +264,6 @@ public function write($string): int } /** - * {@inheritdoc} - * * @return mixed */ public function getMetadata($key = null) diff --git a/src/StreamDecoratorTrait.php b/src/StreamDecoratorTrait.php index dfb3e454..96196a3e 100644 --- a/src/StreamDecoratorTrait.php +++ b/src/StreamDecoratorTrait.php @@ -82,8 +82,6 @@ public function close(): void } /** - * {@inheritdoc} - * * @return mixed */ public function getMetadata($key = null) diff --git a/src/UriNormalizer.php b/src/UriNormalizer.php index 3d98210b..cd4c383a 100644 --- a/src/UriNormalizer.php +++ b/src/UriNormalizer.php @@ -131,8 +131,8 @@ public static function normalize(UriInterface $uri, int $flags = self::PRESERVIN $uri = self::decodeUnreservedCharacters($uri); } - if ($flags & self::CONVERT_EMPTY_PATH && $uri->getPath() === '' && - ($uri->getScheme() === 'http' || $uri->getScheme() === 'https') + if ($flags & self::CONVERT_EMPTY_PATH && $uri->getPath() === '' + && ($uri->getScheme() === 'http' || $uri->getScheme() === 'https') ) { $uri = $uri->withPath('/'); } diff --git a/src/UriResolver.php b/src/UriResolver.php index b942d1ce..38d5793c 100644 --- a/src/UriResolver.php +++ b/src/UriResolver.php @@ -127,8 +127,8 @@ public static function resolve(UriInterface $base, UriInterface $rel): UriInterf */ public static function relativize(UriInterface $base, UriInterface $target): UriInterface { - if ($target->getScheme() !== '' && - ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '') + if ($target->getScheme() !== '' + && ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '') ) { return $target; } diff --git a/src/Utils.php b/src/Utils.php index 49b481e5..917c05e3 100644 --- a/src/Utils.php +++ b/src/Utils.php @@ -231,7 +231,7 @@ public static function modifyRequest(RequestInterface $request, array $changes): * @param StreamInterface $stream Stream to read from * @param int|null $maxLength Maximum buffer length */ - public static function readLine(StreamInterface $stream, ?int $maxLength = null): string + public static function readLine(StreamInterface $stream, int $maxLength = null): string { $buffer = ''; $size = 0; diff --git a/vendor-bin/php-cs-fixer/composer.json b/vendor-bin/php-cs-fixer/composer.json index c9dd5ee4..ffac55c2 100644 --- a/vendor-bin/php-cs-fixer/composer.json +++ b/vendor-bin/php-cs-fixer/composer.json @@ -1,7 +1,7 @@ { "require": { "php": "^7.4 || ^8.0", - "friendsofphp/php-cs-fixer": "3.16.0" + "friendsofphp/php-cs-fixer": "3.23.0" }, "config": { "preferred-install": "dist" diff --git a/vendor-bin/phpstan/composer.json b/vendor-bin/phpstan/composer.json index 711507cb..fc48f6dd 100644 --- a/vendor-bin/phpstan/composer.json +++ b/vendor-bin/phpstan/composer.json @@ -1,8 +1,8 @@ { "require": { "php": "^7.4 || ^8.0", - "phpstan/phpstan": "1.10.11", - "phpstan/phpstan-deprecation-rules": "1.1.3" + "phpstan/phpstan": "1.10.32", + "phpstan/phpstan-deprecation-rules": "1.1.4" }, "config": { "preferred-install": "dist" diff --git a/vendor-bin/psalm/composer.json b/vendor-bin/psalm/composer.json index ab96f2ca..fae19dcd 100644 --- a/vendor-bin/psalm/composer.json +++ b/vendor-bin/psalm/composer.json @@ -1,7 +1,7 @@ { "require": { "php": "^7.4 || ^8.0", - "psalm/phar": "5.9.0" + "psalm/phar": "5.15.0" }, "config": { "preferred-install": "dist"