diff --git a/src/Choir/Http/Client/CurlClient.php b/src/Choir/Http/Client/CurlClient.php index 5c59170..a17a045 100644 --- a/src/Choir/Http/Client/CurlClient.php +++ b/src/Choir/Http/Client/CurlClient.php @@ -32,17 +32,11 @@ class CurlClient implements ClientInterface, TimeoutInterface $this->curl_options = $curl_options; } - /** - * {@inheritDoc} - */ public function setTimeout(int $timeout) { $this->curl_options[CURLOPT_TIMEOUT_MS] = $timeout; } - /** - * {@inheritDoc} - */ public function sendRequest(RequestInterface $request): ResponseInterface { $handle = $this->createHandle($request); diff --git a/src/Choir/Http/Client/Exception/ClientException.php b/src/Choir/Http/Client/Exception/ClientException.php index 081bbcf..7402b6c 100644 --- a/src/Choir/Http/Client/Exception/ClientException.php +++ b/src/Choir/Http/Client/Exception/ClientException.php @@ -6,6 +6,4 @@ namespace Choir\Http\Client\Exception; use Psr\Http\Client\ClientExceptionInterface; -class ClientException extends \Exception implements ClientExceptionInterface -{ -} +class ClientException extends \Exception implements ClientExceptionInterface {} diff --git a/src/Choir/Http/Client/Exception/NetworkException.php b/src/Choir/Http/Client/Exception/NetworkException.php index 9589943..efbb20c 100644 --- a/src/Choir/Http/Client/Exception/NetworkException.php +++ b/src/Choir/Http/Client/Exception/NetworkException.php @@ -11,7 +11,7 @@ class NetworkException extends \Exception implements NetworkExceptionInterface { private RequestInterface $request; - public function __construct(RequestInterface $request, $message = '', $code = 0, \Throwable $previous = null) + public function __construct(RequestInterface $request, $message = '', $code = 0, ?\Throwable $previous = null) { $this->request = $request; parent::__construct($message, $code, $previous); diff --git a/src/Choir/Http/Client/Exception/RequestException.php b/src/Choir/Http/Client/Exception/RequestException.php index d28205c..fffcdf8 100644 --- a/src/Choir/Http/Client/Exception/RequestException.php +++ b/src/Choir/Http/Client/Exception/RequestException.php @@ -11,15 +11,12 @@ class RequestException extends \Exception implements RequestExceptionInterface { private RequestInterface $request; - public function __construct(RequestInterface $request, $message = '', $code = 0, \Throwable $previous = null) + public function __construct(RequestInterface $request, $message = '', $code = 0, ?\Throwable $previous = null) { $this->request = $request; parent::__construct($message, $code, $previous); } - /** - * {@inheritDoc} - */ public function getRequest(): RequestInterface { return $this->request; diff --git a/src/Choir/Http/Client/StreamClient.php b/src/Choir/Http/Client/StreamClient.php index 08948bf..2a7a4f3 100644 --- a/src/Choir/Http/Client/StreamClient.php +++ b/src/Choir/Http/Client/StreamClient.php @@ -44,7 +44,6 @@ class StreamClient implements TimeoutInterface, ClientInterface } /** - * {@inheritdoc} * @throws \Exception */ public function sendRequest(RequestInterface $request): ResponseInterface diff --git a/src/Choir/Http/Stream.php b/src/Choir/Http/Stream.php index e89805d..900973a 100644 --- a/src/Choir/Http/Stream.php +++ b/src/Choir/Http/Stream.php @@ -38,9 +38,7 @@ class Stream implements StreamInterface private ?int $size = null; - private function __construct() - { - } + private function __construct() {} /** * Closes the stream when the destructed. diff --git a/src/Choir/WebSocket/FrameFactory.php b/src/Choir/WebSocket/FrameFactory.php index 007d6d0..532fa14 100644 --- a/src/Choir/WebSocket/FrameFactory.php +++ b/src/Choir/WebSocket/FrameFactory.php @@ -26,7 +26,7 @@ class FrameFactory return new Frame($payload, Opcode::BINARY, true, true); } - public static function createCloseFrame(int $code = null, string $reason = null): Frame + public static function createCloseFrame(?int $code = null, ?string $reason = null): Frame { return new CloseFrame($code, $reason); }