diff --git a/api.include.php b/api.include.php index 730c32dd..f3676846 100644 --- a/api.include.php +++ b/api.include.php @@ -2268,7 +2268,7 @@ public function withoutAttribute($attribute): ServerRequestInterface */ class Stream implements StreamInterface { - function __toString() {} + function __toString():string { return ""; } /** @var resource|null A resource reference */ private $stream; diff --git a/api.php b/api.php index 4422502f..47cb1386 100644 --- a/api.php +++ b/api.php @@ -2268,7 +2268,7 @@ public function withoutAttribute($attribute): ServerRequestInterface */ class Stream implements StreamInterface { - function __toString() {} + function __toString():string { return ""; } /** @var resource|null A resource reference */ private $stream; diff --git a/build.php b/build.php index 3dfd9007..8122f161 100644 --- a/build.php +++ b/build.php @@ -109,7 +109,7 @@ function run(string $base, array $dirs, string $filename, array $ignore, array $ ]; $replaces = [ - 'use StreamTrait;' => 'function __toString() {}' + 'use StreamTrait;' => 'function __toString():string { return ""; }' ]; $directories = ['vendor/nyholm', 'src'];