From 138e435ea3c54315f6ac7fe3a8350b59625d0076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20HULARD?= Date: Mon, 5 Feb 2018 18:19:56 +0100 Subject: [PATCH] fix(php) Return type incompatibility. 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 ``` --- Bin/Client.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Bin/Client.php b/Bin/Client.php index 338b057..db5296b 100644 --- a/Bin/Client.php +++ b/Bin/Client.php @@ -76,7 +76,9 @@ public function main(): int case 'h': case '?': - return $this->usage(); + $this->usage(); + + return 0; case '__ambiguous': $this->resolveOptionAmbiguity($v);