UnusedFunctionCall on socket* functions #8818
Labels
easy problems
Issues that can be fixed without background knowledge of Psalm
enhancement
good first issue
Help wanted
pure/immutable
Hello everyone,
I noticed that Psalm complains about my use of socket functions:
for example:
socket_set_block($socket);
results in:
The call to socket_set_block is not used (see https://psalm.dev/206)
Based on the PHP documentation, the functions socket_bind, socket_set_block and socket_set_nonblock, can be used like that when the return code is irrelevant.
https://www.php.net/manual/en/function.socket-set-nonblock.php
Relevant snippet: https://psalm.dev/r/43f28bcd5d
Thank you.
The text was updated successfully, but these errors were encountered: