hoaproject / Websocket

The Hoa\Websocket library.
https://hoa-project.net/
422 stars 75 forks source link

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

Open shulard opened 6 years ago

shulard commented 6 years ago

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.