diff --git a/src/Common/Uri.php b/src/Common/Uri.php index f6a274a..5205c0a 100644 --- a/src/Common/Uri.php +++ b/src/Common/Uri.php @@ -24,7 +24,7 @@ class Uri implements UriInterface protected null|string $fragment; - public function __construct(string $uri = null) + public function __construct(?string $uri = null) { $this->parse($uri); } diff --git a/src/Stream/Stream.php b/src/Stream/Stream.php index d78868d..804954b 100644 --- a/src/Stream/Stream.php +++ b/src/Stream/Stream.php @@ -107,7 +107,7 @@ class Stream implements StreamInterface return $this->hasMode('acwx+'); } - public function write($string) : false|int + public function write($string) : int { if (! $this->isWritable()) { throw new \UnexpectedValueException("An error occured while trying to seek an unseekable stream."); @@ -166,7 +166,7 @@ class Stream implements StreamInterface return $result; } - public function getMetadata(string $key = null) : mixed + public function getMetadata(?string $key = null) : mixed { $metadata = stream_get_meta_data($this->stream);