Test Failed
Branch master (10cfd0)
by Adam
02:56
created
src/IPub/WebSocketsWAMPClient/Client/Client.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -558,7 +558,7 @@
 block discarded – undo
558 558
 	 * @param string $type
559 559
 	 * @param bool $masked
560 560
 	 *
561
-	 * @return bool|string
561
+	 * @return false|string
562 562
 	 */
563 563
 	private function hybi10Encode(string $payload, string $type = 'text', bool $masked = TRUE)
564 564
 	{
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -18,10 +18,8 @@
 block discarded – undo
18 18
 
19 19
 use Nette;
20 20
 use Nette\Utils;
21
-
22 21
 use React\EventLoop;
23 22
 use React\Stream;
24
-
25 23
 use IPub\WebSocketsWAMPClient\Exceptions;
26 24
 
27 25
 /**
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
  * @date           11.05.18
13 13
  */
14 14
 
15
-declare(strict_types = 1);
15
+declare(strict_types=1);
16 16
 
17 17
 namespace IPub\WebSocketsWAMPClient\Client;
18 18
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 	 */
151 151
 	public function connect() : void
152 152
 	{
153
-		$resource = @stream_socket_client('tcp://' . $this->getHost() . ':' . $this->getPort());
153
+		$resource = @stream_socket_client('tcp://'.$this->getHost().':'.$this->getPort());
154 154
 
155 155
 		if (!$resource) {
156 156
 			throw new Exceptions\ConnectionException('Opening socket failed.');
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 		});
166 166
 
167 167
 		$this->stream->on('close', function () : void {
168
-			echo '[CLOSED]' . PHP_EOL;
168
+			echo '[CLOSED]'.PHP_EOL;
169 169
 		});
170 170
 
171 171
 		$this->stream->write($this->createHeader());
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 	private function parseData($response) : void
319 319
 	{
320 320
 		if (!$this->connected && isset($response['Sec-Websocket-Accept'])) {
321
-			if (base64_encode(pack('H*', sha1($this->key . '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'))) === $response['Sec-Websocket-Accept']) {
321
+			if (base64_encode(pack('H*', sha1($this->key.'258EAFA5-E914-47DA-95CA-C5AB0DC85B11'))) === $response['Sec-Websocket-Accept']) {
322 322
 				$this->connected = TRUE;
323 323
 			}
324 324
 		}
@@ -355,15 +355,15 @@  discard block
 block discarded – undo
355 355
 		$origin = $this->getOrigin() ? $this->getOrigin() : 'null';
356 356
 
357 357
 		return
358
-			"GET {$this->getPath()} HTTP/1.1" . "\r\n" .
359
-			"Origin: {$origin}" . "\r\n" .
360
-			"Host: {$host}:{$this->getPort()}" . "\r\n" .
361
-			"Sec-WebSocket-Key: {$this->getKey()}" . "\r\n" .
362
-			"User-Agent: IPubWebSocketClient/" . self::VERSION . "\r\n" .
363
-			"Upgrade: websocket" . "\r\n" .
364
-			"Connection: Upgrade" . "\r\n" .
365
-			"Sec-WebSocket-Protocol: wamp" . "\r\n" .
366
-			"Sec-WebSocket-Version: 13" . "\r\n" . "\r\n";
358
+			"GET {$this->getPath()} HTTP/1.1"."\r\n".
359
+			"Origin: {$origin}"."\r\n".
360
+			"Host: {$host}:{$this->getPort()}"."\r\n".
361
+			"Sec-WebSocket-Key: {$this->getKey()}"."\r\n".
362
+			"User-Agent: IPubWebSocketClient/".self::VERSION."\r\n".
363
+			"Upgrade: websocket"."\r\n".
364
+			"Connection: Upgrade"."\r\n".
365
+			"Sec-WebSocket-Protocol: wamp"."\r\n".
366
+			"Sec-WebSocket-Version: 13"."\r\n"."\r\n";
367 367
 	}
368 368
 
369 369
 	/**
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 				$parsed['status'] = $field;
399 399
 
400 400
 			} else {
401
-				$content .= $field . "\r\n";
401
+				$content .= $field."\r\n";
402 402
 			}
403 403
 		}
404 404
 
Please login to merge, or discard this patch.
src/IPub/WebSocketsWAMPClient/Logger/Console.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -17,9 +17,7 @@
 block discarded – undo
17 17
 namespace IPub\WebSocketsWAMPClient\Logger;
18 18
 
19 19
 use Nette;
20
-
21 20
 use Psr\Log;
22
-
23 21
 use IPub;
24 22
 
25 23
 /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
  * @date           11.05.18
13 13
  */
14 14
 
15
-declare(strict_types = 1);
15
+declare(strict_types=1);
16 16
 
17 17
 namespace IPub\WebSocketsWAMPClient\Logger;
18 18
 
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 			$this->formatter->writeln($message);
197 197
 
198 198
 		} else {
199
-			echo $message . "\r\n";
199
+			echo $message."\r\n";
200 200
 		}
201 201
 	}
202 202
 }
Please login to merge, or discard this patch.
src/IPub/WebSocketsWAMPClient/DI/WebSocketsWAMPClientExtension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
  * @date           11.05.18
13 13
  */
14 14
 
15
-declare(strict_types = 1);
15
+declare(strict_types=1);
16 16
 
17 17
 namespace IPub\WebSocketsWAMPClient\DI;
18 18
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 		];
105 105
 
106 106
 		foreach ($commands as $name => $cmd) {
107
-			$builder->addDefinition($this->prefix('commands' . lcfirst($name)))
107
+			$builder->addDefinition($this->prefix('commands'.lcfirst($name)))
108 108
 				->setType($cmd)
109 109
 				->addTag(Console\DI\ConsoleExtension::TAG_COMMAND);
110 110
 		}
Please login to merge, or discard this patch.
src/IPub/WebSocketsWAMPClient/Client/IClient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
  * @date           11.05.18
13 13
  */
14 14
 
15
-declare(strict_types = 1);
15
+declare(strict_types=1);
16 16
 
17 17
 namespace IPub\WebSocketsWAMPClient\Client;
18 18
 
Please login to merge, or discard this patch.
src/IPub/WebSocketsWAMPClient/Exceptions/ConnectionException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
  * @date           11.05.18
13 13
  */
14 14
 
15
-declare(strict_types = 1);
15
+declare(strict_types=1);
16 16
 
17 17
 namespace IPub\WebSocketsWAMPClient\Exceptions;
18 18
 
Please login to merge, or discard this patch.
src/IPub/WebSocketsWAMPClient/Exceptions/IException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
  * @date           11.05.18
13 13
  */
14 14
 
15
-declare(strict_types = 1);
15
+declare(strict_types=1);
16 16
 
17 17
 namespace IPub\WebSocketsWAMPClient\Exceptions;
18 18
 
Please login to merge, or discard this patch.
src/IPub/WebSocketsWAMPClient/Commands/ClientCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
  * @date           11.05.18
13 13
  */
14 14
 
15
-declare(strict_types = 1);
15
+declare(strict_types=1);
16 16
 
17 17
 namespace IPub\WebSocketsWAMPClient\Commands;
18 18
 
Please login to merge, or discard this patch.
src/IPub/WebSocketsWAMPClient/Logger/Formatter/IFormatter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
  * @date           11.05.18
13 13
  */
14 14
 
15
-declare(strict_types = 1);
15
+declare(strict_types=1);
16 16
 
17 17
 namespace IPub\WebSocketsWAMPClient\Logger\Formatter;
18 18
 
Please login to merge, or discard this patch.
src/IPub/WebSocketsWAMPClient/Logger/Formatter/Symfony.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
  * @date           11.05.18
13 13
  */
14 14
 
15
-declare(strict_types = 1);
15
+declare(strict_types=1);
16 16
 
17 17
 namespace IPub\WebSocketsWAMPClient\Logger\Formatter;
18 18
 
Please login to merge, or discard this patch.