Skip to content

Commit

Permalink
Merge branch 'master' into staabm-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm authored Dec 3, 2024
2 parents 0d9e469 + c046795 commit 8805376
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions generated/stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}


Expand Down
2 changes: 2 additions & 0 deletions generator/src/PhpStanFunctions/PhpStanType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down

0 comments on commit 8805376

Please sign in to comment.