From 700f6db27f0497adbd7c82593022995c927b6f4f Mon Sep 17 00:00:00 2001 From: Valerian Pereira Date: Tue, 2 Oct 2018 00:21:31 +0530 Subject: [PATCH] PSR2 standard fixes --- src/Nats/Connection.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Nats/Connection.php b/src/Nats/Connection.php index 2937a86..81552d8 100644 --- a/src/Nats/Connection.php +++ b/src/Nats/Connection.php @@ -445,7 +445,10 @@ public function connect($timeout = null) $this->timeout = $timeout; $this->streamSocket = $this->getStream( - $this->options->getAddress(), $timeout, $this->options->getStreamContext()); + $this->options->getAddress(), + $timeout, + $this->options->getStreamContext() + ); $this->setStreamTimeout($timeout); $infoResponse = $this->receive(); @@ -459,10 +462,14 @@ public function connect($timeout = null) function ($errno, $errstr, $errfile, $errline) { restore_error_handler(); throw Exception::forFailedConnection($errstr); - }); + } + ); if (!stream_socket_enable_crypto( - $this->streamSocket, true, STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT)) { + $this->streamSocket, + true, + STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT + )) { throw Exception::forFailedConnection('Error negotiating crypto'); }