Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/composer/squizlabs/php_codesnif…
Browse files Browse the repository at this point in the history
…fer-tw-3.10
  • Loading branch information
akrabat committed Jun 8, 2024
2 parents 03cc97b + bba8ed1 commit 875e335
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [8.0, 8.1, 8.2]
php: [8.0, 8.1, 8.2, 8.3]
experimental: [false]
include:
- php: 8.2
Expand Down
3 changes: 2 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
parameters:
level: max
checkMissingIterableValueType: false
ignoreErrors:
- identifier: missingType.iterableValue
paths:
- src
4 changes: 2 additions & 2 deletions src/Factory/StreamFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function createStream(string $content = ''): StreamInterface
public function createStreamFromFile(
string $filename,
string $mode = 'r',
StreamInterface $cache = null
?StreamInterface $cache = null
): StreamInterface {
set_error_handler(
static function (int $errno, string $errstr) use ($filename, $mode): void {
Expand Down Expand Up @@ -82,7 +82,7 @@ static function (int $errno, string $errstr) use ($filename, $mode): void {
/**
* {@inheritdoc}
*/
public function createStreamFromResource($resource, StreamInterface $cache = null): StreamInterface
public function createStreamFromResource($resource, ?StreamInterface $cache = null): StreamInterface
{
if (!is_resource($resource)) {
throw new InvalidArgumentException(
Expand Down
1 change: 0 additions & 1 deletion src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ public function getQueryParams(): array
// Decode URL data
parse_str($this->uri->getQuery(), $this->queryParams);

// @phpstan-ignore-next-line
return is_array($this->queryParams) ? $this->queryParams : [];
}

Expand Down
2 changes: 1 addition & 1 deletion src/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public function read($length): string
{
$data = false;

if ($this->isReadable() && $this->stream && $length >= 0) {
if ($this->isReadable() && $this->stream && $length > 0) {
$data = fread($this->stream, $length);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
],
Message::class => [
'header' => function (string $string, bool $replace = true, int $statusCode = null): void {
'header' => function (string $string, bool $replace = true, ?int $statusCode = null): void {
HeaderStack::push(
[
'header' => $string,
Expand Down

0 comments on commit 875e335

Please sign in to comment.