@@ -26,8 +26,8 @@ |
||
26 | 26 | */ |
27 | 27 | public function connect(string $address, int $port = 0, array $options = []): TransportInterface |
28 | 28 | { |
29 | - $timeout = (float)($options['timeout'] ??(float) ini_get('default_socket_timeout')); |
|
30 | - $url = $this->socketPrefix . $address; |
|
29 | + $timeout = (float) ($options['timeout'] ??(float) ini_get('default_socket_timeout')); |
|
30 | + $url = $this->socketPrefix.$address; |
|
31 | 31 | $this->socket = @fsockopen($url, $port, $this->errorNumber, $this->errorMessage, $timeout); |
32 | 32 | |
33 | 33 | return $this; |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | $packages = $this->splitToChunks($message); |
16 | 16 | $bytes = 0; |
17 | 17 | foreach ($packages as $package) { |
18 | - $bytes += (int)parent::write($package); |
|
18 | + $bytes += (int) parent::write($package); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | return $bytes; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $id = $this->generateId(); |
41 | 41 | |
42 | 42 | foreach ($chunks as $n => &$chunk) { |
43 | - $chunk = self::CHUNK_MAGIC . $id . pack('CC', $n, $count) . $chunk; |
|
43 | + $chunk = self::CHUNK_MAGIC.$id.pack('CC', $n, $count).$chunk; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | return $chunks; |
@@ -14,7 +14,7 @@ |
||
14 | 14 | parent::connect($address, $port, $options); |
15 | 15 | |
16 | 16 | if ($this->socket === false) { |
17 | - throw new RuntimeException('can`t open socket - ' . $this->errorNumber . ': ' . $this->errorMessage); |
|
17 | + throw new RuntimeException('can`t open socket - '.$this->errorNumber.': '.$this->errorMessage); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | return $this; |