Passed
Branch master (4e34bd)
by Alexpts
02:05
created
Category
src/UdpSocket.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $packages = $this->splitToChunks($message);
38 38
         $bytes = 0;
39 39
         foreach ($packages as $package) {
40
-            $bytes += (int)parent::write($package, $length);
40
+            $bytes += (int) parent::write($package, $length);
41 41
         }
42 42
 
43 43
         return $bytes;
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $id = substr(md5(uniqid('', true), true), 0, 8);
51 51
 
52 52
         foreach ($chunks as $n => &$chunk) {
53
-            $chunk = self::CHUNK_MAGIC_ID . $id . pack('CC', $n, $count) . $chunk;
53
+            $chunk = self::CHUNK_MAGIC_ID.$id.pack('CC', $n, $count).$chunk;
54 54
         }
55 55
 
56 56
         return $chunks;
Please login to merge, or discard this patch.
src/Socket.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/TcpSocket.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
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;
@@ -22,6 +22,6 @@  discard block
 block discarded – undo
22 22
 
23 23
     public function write(string $buffer, int $length = null): int
24 24
     {
25
-        return parent::write($buffer . "\0", $length);
25
+        return parent::write($buffer."\0", $length);
26 26
     }
27 27
 }
Please login to merge, or discard this patch.