Skip to content

Commit 9f27717

Browse files
authored
Merge pull request #226 from fezfez/fixphp8
fix #225
2 parents 85e21ee + 6377548 commit 9f27717

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

generated/sockets.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ function socket_write($socket, string $buffer, int $length = 0): int
794794
* @throws SocketsException
795795
*
796796
*/
797-
function socket_wsaprotocol_info_export(resource $socket, int $target_pid): string
797+
function socket_wsaprotocol_info_export($socket, int $target_pid): string
798798
{
799799
error_clear_last();
800800
$result = \socket_wsaprotocol_info_export($socket, $target_pid);

generator/src/PhpStanFunctions/PhpStanType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ public function getSignatureType(?int $errorType = null): string
106106
$type = 'array'; //typed array has to be untyped
107107
} elseif (\strpos($type, '[]') !== false) {
108108
$type = 'iterable'; //generics cannot be typehinted and have to be turned into iterable
109+
} elseif (\strpos($type, 'resource') !== false) {
110+
$type = ''; // resource cant be typehinted
109111
}
110112
}
111113

0 commit comments

Comments
 (0)