Websocket icon indicating copy to clipboard operation
Websocket copied to clipboard

PHP 7 Upgrade: Return type error in the `Bin/Client.php` class.

Open shulard opened this issue 7 years ago • 0 comments

Hello,

In the Bin/Client.php class, the return type for the main method is :int. But at line 79, there is a call to $this->usage() which return void.

Since the value returned by that method is not compatible with the main signature, we get an error like :

Uncaught TypeError: Return value of Hoa\Websocket\Bin\Client::main() must be of the type integer, null returned

https://github.com/hoaproject/Websocket/blob/f5cf84e5f51490f2aa88eb375bfabc1b2fcb3678/Bin/Client.php#L79

This is related to RFC: hoaproject/Central#75.

shulard avatar Feb 05 '18 17:02 shulard