Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shulard
Copy link
Contributor

@shulard shulard commented Feb 5, 2018

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

return $this->usage();

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

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
```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant