Passed
Push — master ( 7e7628...15770c )
by Petr
02:33
created
php-tests/BasicTests/ConnectionTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,6 +129,6 @@
 block discarded – undo
129 129
             $processor->setData($query);
130 130
         }
131 131
         $response = $processor->getResponse();
132
-        return $response ? stream_get_contents($response) : '' ;
132
+        return $response ? stream_get_contents($response) : '';
133 133
     }
134 134
 }
Please login to merge, or discard this patch.
php-tests/ProtocolsTests/Restful/QueryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
         $lib = $this->prepareQuerySimple();
22 22
         $lib->setHost('somewhere.example');
23 23
         $lib->setPort(80);
24
-        $lib->addValues(['foo' => 'bar', 'abc' => 'def',]);
24
+        $lib->addValues(['foo' => 'bar', 'abc' => 'def', ]);
25 25
 
26 26
         $this->assertEquals("GET /example HTTP/1.1\r\nHost: somewhere.example\r\nContent-Length: 25\r\n\r\n"
27 27
             . '{"foo":"bar","abc":"def"}'
Please login to merge, or discard this patch.
php-tests/ProtocolsTests/WebDav/QueryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
         $lib = $this->prepareQuerySimple();
30 30
         $lib->setHost('somewhere.example');
31 31
         $lib->setPort(80);
32
-        $lib->addValues(['foo' => 'bar', 'abc' => 'def',]);
32
+        $lib->addValues(['foo' => 'bar', 'abc' => 'def', ]);
33 33
 
34 34
         $this->assertEquals("GET /example HTTP/1.1\r\nHost: somewhere.example\r\nContent-Length: 15\r\n\r\n"
35 35
             . 'foo=bar&abc=def'
Please login to merge, or discard this patch.
php-tests/ProtocolsTests/Fsp/AnswerTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             # content...
53 53
             0x12, 0x34, 0x56, 0x78, # time
54 54
             0x00, 0x00, 0x04, 0x00, # size
55
-            0x01,                   # type
55
+            0x01, # type
56 56
             'foo-bar-baz.txt', 0x00, # filename - "foo-bar-baz.txt\0"
57 57
             0x00, 0x00, 0x00, # padding 28
58 58
 
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
             0x03, 0x04, # sequence
247 247
             0x00, 0x09, # data_length
248 248
             0x00, 0x00, 0x00, 0x00, # position
249
-            0x5E, 0x0B, 0xE1, 0x01,    0x00, 0x23, 0x44, 0x00,    0b00100000, # file stats - 2020-01-01T00:00:01+00:00, 2311168 B file
249
+            0x5E, 0x0B, 0xE1, 0x01, 0x00, 0x23, 0x44, 0x00, 0b00100000, # file stats - 2020-01-01T00:00:01+00:00, 2311168 B file
250 250
             # no extra data
251 251
         ]);
252 252
     }
Please login to merge, or discard this patch.
examples/udp/server.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 error_reporting(~E_WARNING);
6 6
 
7 7
 //Create a UDP socket
8
-if(!($sock = socket_create(AF_INET, SOCK_DGRAM, 0)))
8
+if (!($sock = socket_create(AF_INET, SOCK_DGRAM, 0)))
9 9
 {
10 10
     $errorcode = socket_last_error();
11 11
     $errormsg = socket_strerror($errorcode);
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 echo "Socket created \n";
17 17
 
18 18
 // Bind the source address
19
-if( !socket_bind($sock, "0.0.0.0" , 9999) )
19
+if (!socket_bind($sock, "0.0.0.0", 9999))
20 20
 {
21 21
     $errorcode = socket_last_error();
22 22
     $errormsg = socket_strerror($errorcode);
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 echo "Socket bind OK \n";
28 28
 
29 29
 //Do some communication, this loop can handle multiple clients
30
-while(1)
30
+while (1)
31 31
 {
32 32
     echo "Waiting for data ... \n";
33 33
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     echo "$remote_ip : $remote_port -- " . $buf;
37 37
 
38 38
     //Send back the data to the client
39
-    socket_sendto($sock, "OK " . $buf , 100 , 0 , $remote_ip , $remote_port);
39
+    socket_sendto($sock, "OK " . $buf, 100, 0, $remote_ip, $remote_port);
40 40
 }
41 41
 
42 42
 socket_close($sock);
43 43
\ No newline at end of file
Please login to merge, or discard this patch.
php-src/Pointers/SocketProcessor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
     {
48 48
         $this->remoteResponse = null;
49 49
         $reply = null;
50
-        $result = socket_recv($filePointer, $reply , static::PART_SPLIT , MSG_WAITALL);
50
+        $result = socket_recv($filePointer, $reply, static::PART_SPLIT, MSG_WAITALL);
51 51
         if (false === $result) { // because could return size 0 bytes
52 52
             $errorCode = socket_last_error();
53 53
             $errorMessage = socket_strerror($errorCode);
Please login to merge, or discard this patch.
php-src/Protocols/AProtocol.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         $this->lang = $lang;
35 35
         $pointer = empty($contextOptions)
36 36
             ? ($long ? new RemoteRequest\Sockets\PfSocket($lang) : new RemoteRequest\Sockets\FSocket($lang))
37
-            : (new RemoteRequest\Sockets\Stream($lang))->setContextOptions($contextOptions) ;
37
+            : (new RemoteRequest\Sockets\Stream($lang))->setContextOptions($contextOptions);
38 38
         $this->processor = new RemoteRequest\Connection\Processor($lang, $pointer);
39 39
         $this->target = $this->loadTarget();
40 40
         $this->query = $this->loadQuery();
Please login to merge, or discard this patch.
php-src/Protocols/Fsp/Session.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 
51 51
     public function hasKey(): bool
52 52
     {
53
-        return (empty($this->host))? false : (!empty(static::$key[$this->host]));
53
+        return (empty($this->host)) ? false : (!empty(static::$key[$this->host]));
54 54
     }
55 55
 
56 56
     /**
Please login to merge, or discard this patch.
php-src/Protocols/Fsp/Answer/GetDir/FileInfo.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
55 55
     protected function parseLinkName(): void
56 56
     {
57 57
         $nlpos = strpos($this->file_name, "\n");
58
-        $this->link_name = $nlpos ? substr($this->file_name, $nlpos + 1) : '' ;
59
-        $this->file_name = $this->link_name && $nlpos ? substr($this->file_name, 0, $nlpos) : $this->file_name ;
58
+        $this->link_name = $nlpos ? substr($this->file_name, $nlpos + 1) : '';
59
+        $this->file_name = $this->link_name && $nlpos ? substr($this->file_name, 0, $nlpos) : $this->file_name;
60 60
     }
61 61
 
62 62
     public function setPath(string $path): self
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 
172 172
     public function getLinkTarget(): string
173 173
     {
174
-        return $this->isLink() ? $this->link_name : '' ;
174
+        return $this->isLink() ? $this->link_name : '';
175 175
     }
176 176
 
177 177
     #[\ReturnTypeWillChange]
Please login to merge, or discard this patch.