diff --git a/.State b/.State deleted file mode 100644 index a604de4..0000000 --- a/.State +++ /dev/null @@ -1 +0,0 @@ -finalized diff --git a/Connection.php b/Source/Connection.php similarity index 89% rename from Connection.php rename to Source/Connection.php index 1f2dd59..4077941 100644 --- a/Connection.php +++ b/Source/Connection.php @@ -1,5 +1,7 @@ _responseOutput = null; $this->_responseError = null; @@ -304,52 +291,40 @@ public function send(array $headers, $content = null) /** * Get response content. - * - * @return ?string */ - public function getResponseContent() + public function getResponseContent(): ?string { return $this->_responseOutput; } /** * Get response error if any. - * - * @return ?string */ - public function getResponseError() + public function getResponseError(): ?string { return $this->_responseError; } /** * Get response headers. - * - * @return array */ - public function getResponseHeaders() + public function getResponseHeaders(): array { return $this->_responseHeaders; } /** * Read data. - * - * @param int $length Length of data to read. - * @return string */ - protected function read($length) + protected function read(int $length): ?string { return $this->getClient()->read($length); } /** * Set client. - * - * @param \Hoa\Socket\Client $client Client. - * @return \Hoa\Socket\Client */ - public function setClient(Socket\Client $client) + public function setClient(Socket\Client $client): ?Socket\Client { $old = $this->_client; $this->_client = $client; @@ -359,10 +334,8 @@ public function setClient(Socket\Client $client) /** * Get client. - * - * @return \Hoa\Socket\Client */ - public function getClient() + public function getClient(): Socket\Client { return $this->_client; } diff --git a/composer.json b/composer.json index 0112ba1..5c842fe 100644 --- a/composer.json +++ b/composer.json @@ -23,16 +23,17 @@ "source": "https://central.hoa-project.net/Resource/Library/Fastcgi" }, "require": { - "hoa/consistency": "~1.0", - "hoa/exception" : "~1.0", - "hoa/socket" : "~1.0" + "php" : ">=7.1", + "hoa/consistency": "dev-master", + "hoa/exception" : "dev-master", + "hoa/socket" : "dev-master" }, "require-dev": { - "hoa/test": "~2.0" + "hoa/test": "dev-master" }, "autoload": { "psr-4": { - "Hoa\\Fastcgi\\": "." + "Hoa\\Fastcgi\\": "Source" } }, "extra": {