Skip to content

Commit

Permalink
Force nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
asika32764 committed Dec 2, 2024
1 parent 9d87e95 commit 8d38bf3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/CachingStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ class CachingStream extends DecoratorStream
/**
* We will treat the buffer object as the body of the stream
*
* @param StreamInterface|string|resource $targetStream Stream to cache
* @param StreamInterface $cacheStream Optionally specify where data is cached
* @param StreamInterface|string|resource $targetStream Stream to cache
* @param StreamInterface|null $cacheStream Optionally specify where data is cached
*/
public function __construct(
mixed $targetStream,
StreamInterface $cacheStream = null
?StreamInterface $cacheStream = null
) {
$this->remoteStream = Stream::wrap($targetStream);

Expand Down
2 changes: 1 addition & 1 deletion src/DecoratorStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class DecoratorStream implements StreamInterface
{
protected StreamInterface $stream;

public function __construct(StreamInterface $target = null)
public function __construct(?StreamInterface $target = null)
{
if ($target) {
$this->stream = $target;
Expand Down

0 comments on commit 8d38bf3

Please sign in to comment.