Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

Commit bc1e665

Browse files
committed
Fix lint issues with PSR2 standard
1 parent dc3ba75 commit bc1e665

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/Nats/Connection.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function __construct(ConnectionOptions $options = null)
130130
$this->pubs = 0;
131131
$this->subscriptions = [];
132132
$this->options = $options;
133-
if(version_compare(phpversion(), '7.0', '>')){
133+
if (version_compare(phpversion(), '7.0', '>')) {
134134
$this->randomGenerator = new Php71RandomGenerator();
135135
} else {
136136
$randomFactory = new Factory();
@@ -212,7 +212,9 @@ private function getStream($address, $timeout)
212212
$errno = null;
213213
$errstr = null;
214214

215-
set_error_handler(function(){return true;});
215+
set_error_handler(function () {
216+
return true;
217+
});
216218
$fp = stream_socket_client($address, $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT);
217219
restore_error_handler();
218220

src/Nats/Php71RandomGenerator.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
namespace Nats;
55

6-
7-
86
class Php71RandomGenerator
97
{
108
/**
@@ -13,7 +11,8 @@ class Php71RandomGenerator
1311
* @param $len
1412
* @return string
1513
*/
16-
public function generateString($len) {
14+
public function generateString($len)
15+
{
1716
return bin2hex(random_bytes($len));
1817
}
19-
}
18+
}

0 commit comments

Comments
 (0)