Skip to content

Commit

Permalink
Merge pull request #305 from kamil-tekiela/Fix-PHP-8.4-deprecations
Browse files Browse the repository at this point in the history
Fix implicitly nullable params
  • Loading branch information
akrabat committed Jun 8, 2024
2 parents 372e11c + 9ffca3d commit bba8ed1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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
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 bba8ed1

Please sign in to comment.