diff --git a/generated/stream.php b/generated/stream.php index e5e0ce9c..81c76791 100644 --- a/generated/stream.php +++ b/generated/stream.php @@ -20,14 +20,13 @@ * @throws StreamException * */ -function stream_context_set_options($context, array $options): true +function stream_context_set_options($context, array $options): void { error_clear_last(); $safeResult = \stream_context_set_options($context, $options); if ($safeResult === false) { throw StreamException::createFromPhpError(); } - return $safeResult; } diff --git a/generator/src/PhpStanFunctions/PhpStanType.php b/generator/src/PhpStanFunctions/PhpStanType.php index dfe8b0b2..33ec387c 100644 --- a/generator/src/PhpStanFunctions/PhpStanType.php +++ b/generator/src/PhpStanFunctions/PhpStanType.php @@ -148,6 +148,8 @@ public function getSignatureType(?int $errorType = null): string $type = ''; // resource cant be typehinted } elseif (\strpos($type, 'null') !== false) { $type = ''; // null is a real typehint + } elseif (\strpos($type, 'true') !== false) { + $type = 'bool'; // php8.1 doesn't support "true" as a typehint } }