diff --git a/generated/sockets.php b/generated/sockets.php index cf8de0e7..e530507c 100644 --- a/generated/sockets.php +++ b/generated/sockets.php @@ -794,7 +794,7 @@ function socket_write($socket, string $buffer, int $length = 0): int * @throws SocketsException * */ -function socket_wsaprotocol_info_export(resource $socket, int $target_pid): string +function socket_wsaprotocol_info_export($socket, int $target_pid): string { error_clear_last(); $result = \socket_wsaprotocol_info_export($socket, $target_pid); diff --git a/generator/src/PhpStanFunctions/PhpStanType.php b/generator/src/PhpStanFunctions/PhpStanType.php index 7635bd16..7d199ee8 100644 --- a/generator/src/PhpStanFunctions/PhpStanType.php +++ b/generator/src/PhpStanFunctions/PhpStanType.php @@ -106,6 +106,8 @@ public function getSignatureType(?int $errorType = null): string $type = 'array'; //typed array has to be untyped } elseif (\strpos($type, '[]') !== false) { $type = 'iterable'; //generics cannot be typehinted and have to be turned into iterable + } elseif (\strpos($type, 'resource') !== false) { + $type = ''; // resource cant be typehinted } }