Passed
Push — master ( 660841...e0567e )
by Gaetano
09:30
created
tests/08ServerTest.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include_once __DIR__ . '/../lib/xmlrpc_wrappers.inc';
3
+include_once __DIR__.'/../lib/xmlrpc_wrappers.inc';
4 4
 
5
-include_once __DIR__ . '/ServerAwareTestCase.php';
5
+include_once __DIR__.'/ServerAwareTestCase.php';
6 6
 
7 7
 /**
8 8
  * Tests which involve interaction with the server - carried out via the client.
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         // (but only if not called from subclass objects / multitests)
31 31
         if (function_exists('debug_backtrace') && strtolower(get_called_class()) == 'servertest') {
32 32
             $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
33
-            for ($i = 0; $i < count($trace); $i++) {
33
+            for ($i = 0; $i<count($trace); $i++) {
34 34
                 if (strpos($trace[$i]['function'], 'test') === 0) {
35 35
                     self::$failed_tests[$trace[$i]['function']] = true;
36 36
                     break;
@@ -79,9 +79,9 @@  discard block
 block discarded – undo
79 79
         }
80 80
         $this->validateResponse($r);
81 81
         if (is_array($errorCode)) {
82
-            $this->assertContains($r->faultCode(), $errorCode, 'Error ' . $r->faultCode() . ' connecting to server: ' . $r->faultString());
82
+            $this->assertContains($r->faultCode(), $errorCode, 'Error '.$r->faultCode().' connecting to server: '.$r->faultString());
83 83
         } else {
84
-            $this->assertEquals($errorCode, $r->faultCode(), 'Error ' . $r->faultCode() . ' connecting to server: ' . $r->faultString());
84
+            $this->assertEquals($errorCode, $r->faultCode(), 'Error '.$r->faultCode().' connecting to server: '.$r->faultString());
85 85
         }
86 86
         if (!$r->faultCode()) {
87 87
             if ($returnResponse) {
@@ -108,20 +108,20 @@  discard block
 block discarded – undo
108 108
         $query = parse_url($this->client->path, PHP_URL_QUERY);
109 109
         parse_str($query, $vars);
110 110
         $query = http_build_query(array_merge($vars, $data));
111
-        $this->client->path = parse_url($this->client->path, PHP_URL_PATH) . '?' . $query;
111
+        $this->client->path = parse_url($this->client->path, PHP_URL_PATH).'?'.$query;
112 112
     }
113 113
 
114 114
     public function testString()
115 115
     {
116
-        $sendString = "here are 3 \"entities\": < > & " .
117
-            "and here's a dollar sign: \$pretendvarname and a backslash too: " . chr(92) .
118
-            " - isn't that great? \\\"hackery\\\" at it's best " .
119
-            " also don't want to miss out on \$item[0]. " .
120
-            "The real weird stuff follows: CRLF here" . chr(13) . chr(10) .
121
-            "a simple CR here" . chr(13) .
122
-            "a simple LF here" . chr(10) .
123
-            "and then LFCR" . chr(10) . chr(13) .
124
-            "last but not least weird names: G" . chr(252) . "nter, El" . chr(232) . "ne, and an xml comment closing tag: -->";
116
+        $sendString = "here are 3 \"entities\": < > & ".
117
+            "and here's a dollar sign: \$pretendvarname and a backslash too: ".chr(92).
118
+            " - isn't that great? \\\"hackery\\\" at it's best ".
119
+            " also don't want to miss out on \$item[0]. ".
120
+            "The real weird stuff follows: CRLF here".chr(13).chr(10).
121
+            "a simple CR here".chr(13).
122
+            "a simple LF here".chr(10).
123
+            "and then LFCR".chr(10).chr(13).
124
+            "last but not least weird names: G".chr(252)."nter, El".chr(232)."ne, and an xml comment closing tag: -->";
125 125
         $m = new xmlrpcmsg('examples.stringecho', array(
126 126
             new xmlrpcval($sendString, 'string'),
127 127
         ));
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     public function testLatin1String()
143 143
     {
144 144
         $sendString =
145
-            "last but not least weird names: G" . chr(252) . "nter, El" . chr(232) . "ne";
145
+            "last but not least weird names: G".chr(252)."nter, El".chr(232)."ne";
146 146
         $x = '<?xml version="1.0" encoding="ISO-8859-1"?><methodCall><methodName>examples.stringecho</methodName><params><param><value>'.
147 147
             $sendString.
148 148
             '</value></param></params></methodCall>';
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
     public function testUtf8Method()
252 252
     {
253 253
         PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding = 'UTF-8';
254
-        $m = new xmlrpcmsg("tests.utf8methodname." . 'κόσμε', array(
254
+        $m = new xmlrpcmsg("tests.utf8methodname.".'κόσμε', array(
255 255
             new xmlrpcval('hello')
256 256
         ));
257 257
         $v = $this->send($m);
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
         ));
273 273
         $v = $this->send($m);
274 274
         if ($v) {
275
-            $this->assertEquals($a + $b, $v->scalarval());
275
+            $this->assertEquals($a+$b, $v->scalarval());
276 276
         }
277 277
     }
278 278
 
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
         ));
285 285
         $v = $this->send($m);
286 286
         if ($v) {
287
-            $this->assertEquals(12 - 23, $v->scalarval());
287
+            $this->assertEquals(12-23, $v->scalarval());
288 288
         }
289 289
     }
290 290
 
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
         if ($v) {
324 324
             $sz = $v->arraysize();
325 325
             $got = '';
326
-            for ($i = 0; $i < $sz; $i++) {
326
+            for ($i = 0; $i<$sz; $i++) {
327 327
                 $b = $v->arraymem($i);
328 328
                 if ($b->scalarval()) {
329 329
                     $got .= '1';
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
             $got = '';
371 371
             $expected = '37210';
372 372
             $expect_array = array('ctLeftAngleBrackets', 'ctRightAngleBrackets', 'ctAmpersands', 'ctApostrophes', 'ctQuotes');
373
-            foreach($expect_array as $val) {
373
+            foreach ($expect_array as $val) {
374 374
                 $b = $v->structmem($val);
375 375
                 $got .= $b->scalarVal();
376 376
             }
@@ -873,7 +873,7 @@  discard block
 block discarded – undo
873 873
     {
874 874
         // make a 'deep client copy' as the original one might have many properties set
875 875
         // also for speed only wrap one method of the whole server
876
-        $class = wrap_xmlrpc_server($this->client, array('simple_client_copy' => 0, 'method_filter' => '/examples\.getStateName/' ));
876
+        $class = wrap_xmlrpc_server($this->client, array('simple_client_copy' => 0, 'method_filter' => '/examples\.getStateName/'));
877 877
         if ($class == '') {
878 878
             $this->fail('Registration of remote server failed');
879 879
         } else {
@@ -912,9 +912,9 @@  discard block
 block discarded – undo
912 912
         $cookies = array(
913 913
             //'c1' => array(),
914 914
             'c2' => array('value' => 'c2'),
915
-            'c3' => array('value' => 'c3', 'expires' => time() + 60 * 60 * 24 * 30),
916
-            'c4' => array('value' => 'c4', 'expires' => time() + 60 * 60 * 24 * 30, 'path' => '/'),
917
-            'c5' => array('value' => 'c5', 'expires' => time() + 60 * 60 * 24 * 30, 'path' => '/', 'domain' => 'localhost'),
915
+            'c3' => array('value' => 'c3', 'expires' => time()+60 * 60 * 24 * 30),
916
+            'c4' => array('value' => 'c4', 'expires' => time()+60 * 60 * 24 * 30, 'path' => '/'),
917
+            'c5' => array('value' => 'c5', 'expires' => time()+60 * 60 * 24 * 30, 'path' => '/', 'domain' => 'localhost'),
918 918
         );
919 919
         $cookiesval = php_xmlrpc_encode($cookies);
920 920
         $m = new xmlrpcmsg('tests.setcookies', array($cookiesval));
@@ -962,10 +962,10 @@  discard block
 block discarded – undo
962 962
         $m = new xmlrpcmsg('tests.getcookies', array());
963 963
         foreach ($cookies as $cookie => $val) {
964 964
             $this->client->setCookie($cookie, $val);
965
-            $cookies[$cookie] = (string)$cookies[$cookie];
965
+            $cookies[$cookie] = (string) $cookies[$cookie];
966 966
         }
967 967
         $r = $this->client->send($m, $this->timeout, $this->method);
968
-        $this->assertEquals(0, $r->faultCode(), 'Error ' . $r->faultCode() . ' connecting to server: ' . $r->faultString());
968
+        $this->assertEquals(0, $r->faultCode(), 'Error '.$r->faultCode().' connecting to server: '.$r->faultString());
969 969
         if (!$r->faultCode()) {
970 970
             $v = $r->value();
971 971
             $v = php_xmlrpc_decode($v);
Please login to merge, or discard this patch.
tests/index.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 // In case this file is made available on an open-access server, avoid it being useable by anyone who can not also
8 8
 // write a specific file to disk.
9 9
 // NB: keep filename, cookie name in sync with the code within the TestCase classes sending http requests to this file
10
-$idFile = sys_get_temp_dir() . '/phpunit_rand_id.txt';
10
+$idFile = sys_get_temp_dir().'/phpunit_rand_id.txt';
11 11
 $randId = isset($_COOKIE['PHPUNIT_RANDOM_TEST_ID']) ? $_COOKIE['PHPUNIT_RANDOM_TEST_ID'] : '';
12 12
 $fileId = file_exists($idFile) ? file_get_contents($idFile) : '';
13 13
 if ($randId == '' || $fileId == '' || $fileId !== $randId) {
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         chmod($GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY'], 0777);
32 32
     }
33 33
 
34
-    include_once __DIR__ . "/../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/prepend.php";
34
+    include_once __DIR__."/../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/prepend.php";
35 35
 }
36 36
 
37 37
 $targetFile = null;
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 }
55 55
 
56 56
 if (isset($_COOKIE['PHPUNIT_SELENIUM_TEST_ID']) && extension_loaded('xdebug')) {
57
-    include_once __DIR__ . "/../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/append.php";
57
+    include_once __DIR__."/../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/append.php";
58 58
 }
59 59
 
60 60
 /**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         } elseif ($_GET['FORCE_AUTH'] == 'Digest') {
88 88
             if (empty($_SERVER['PHP_AUTH_DIGEST'])) {
89 89
                 header('HTTP/1.1 401 Unauthorized');
90
-                header('WWW-Authenticate: Digest realm="Phpxmlrpc Digest Realm",qop="auth",nonce="' . uniqid() . '",opaque="' . md5('Phpxmlrpc Digest Realm') . '"');
90
+                header('WWW-Authenticate: Digest realm="Phpxmlrpc Digest Realm",qop="auth",nonce="'.uniqid().'",opaque="'.md5('Phpxmlrpc Digest Realm').'"');
91 91
                 die('Text visible if user hits Cancel button');
92 92
             }
93 93
         }
@@ -95,11 +95,11 @@  discard block
 block discarded – undo
95 95
     if (isset($_GET['FORCE_REDIRECT'])) {
96 96
         header('HTTP/1.0 302 Found');
97 97
         unset($_GET['FORCE_REDIRECT']);
98
-        header('Location: ' . $_SERVER['REQUEST_URI'] . (count($_GET) ? '?' . http_build_query($_GET) : ''));
98
+        header('Location: '.$_SERVER['REQUEST_URI'].(count($_GET) ? '?'.http_build_query($_GET) : ''));
99 99
         die();
100 100
     }
101
-    if (isset($_GET['SLOW_LORIS']) && $_GET['SLOW_LORIS'] > 0) {
102
-        slowLoris((int)$_GET['SLOW_LORIS'], $s);
101
+    if (isset($_GET['SLOW_LORIS']) && $_GET['SLOW_LORIS']>0) {
102
+        slowLoris((int) $_GET['SLOW_LORIS'], $s);
103 103
         die();
104 104
     }
105 105
 }
@@ -113,13 +113,13 @@  discard block
 block discarded – undo
113 113
 {
114 114
     /// @todo as is, this method can not be used by eg. jsonrpc servers. We could look at the value $s::$responseClass
115 115
     ///       to improve that
116
-    $strings = array('<?xml version="1.0"?>','<methodResponse>','<params>','<param>','<value>','<string></string>','</value>','</param>','</params>','</methodResponse>');
116
+    $strings = array('<?xml version="1.0"?>', '<methodResponse>', '<params>', '<param>', '<value>', '<string></string>', '</value>', '</param>', '</params>', '</methodResponse>');
117 117
 
118 118
     header('Content-type: xml; charset=utf-8');
119
-    foreach($strings as $i => $string) {
119
+    foreach ($strings as $i => $string) {
120 120
         echo $string;
121 121
         flush();
122
-        if ($i < count($strings) && $secs > 0 && $secs <= 60) {
122
+        if ($i<count($strings) && $secs>0 && $secs<=60) {
123 123
             sleep($secs);
124 124
         }
125 125
     }
Please login to merge, or discard this patch.
tests/02ValueTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include_once __DIR__ . '/LoggerAwareTestCase.php';
3
+include_once __DIR__.'/LoggerAwareTestCase.php';
4 4
 
5 5
 /**
6 6
  * Tests involving the Value class.
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
             if (version_compare(PHP_VERSION, '8.0', '>=')) {
139 139
                 $str = sprintf("%f", $v->scalarval());
140 140
             } else {
141
-                $str = (string)$v->scalarval();
141
+                $str = (string) $v->scalarval();
142 142
             }
143 143
             if (strpos($str, ',') == 1) {
144 144
                 $r = $v->serialize();
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         $this->assertequals(1, count($v1));
160 160
         $out = array('me' => array(), 'mytype' => 2, '_php_class' => null);
161 161
 
162
-        foreach($v1 as $key => $val)
162
+        foreach ($v1 as $key => $val)
163 163
         {
164 164
             $this->assertArrayHasKey($key, $out);
165 165
             $expected = $out[$key];
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         $this->assertequals(2, count($v2));
175 175
         $out = array(array('key' => 0, 'value'  => 'object'), array('key' => 1, 'value'  => 'object'));
176 176
         $i = 0;
177
-        foreach($v2 as $key => $val)
177
+        foreach ($v2 as $key => $val)
178 178
         {
179 179
             $expected = $out[$i];
180 180
             $this->assertequals($expected['key'], $key);
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
     {
202 202
         // nb: make sure that  the serialized xml corresponding to this is > 10MB in size
203 203
         $data = array();
204
-        for ($i = 0; $i < 500000; $i++ ) {
204
+        for ($i = 0; $i<500000; $i++) {
205 205
             $data[] = 'hello world';
206 206
         }
207 207
 
Please login to merge, or discard this patch.
tests/legacy_loader_test.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,15 +6,15 @@  discard block
 block discarded – undo
6 6
 
7 7
 echo "Legacy Loader Test\n\n";
8 8
 
9
-include_once __DIR__ . '/../lib/xmlrpc.inc';
9
+include_once __DIR__.'/../lib/xmlrpc.inc';
10 10
 
11
-include_once __DIR__ . '/parse_args.php';
11
+include_once __DIR__.'/parse_args.php';
12 12
 
13 13
 $args = argParser::getArgs();
14
-$baseurl = 'http://' . $args['HTTPSERVER'] . str_replace('/server.php', '/legacy.php', $args['HTTPURI']);
14
+$baseurl = 'http://'.$args['HTTPSERVER'].str_replace('/server.php', '/legacy.php', $args['HTTPURI']);
15 15
 
16 16
 $randId = uniqid();
17
-file_put_contents(sys_get_temp_dir() . '/phpunit_rand_id.txt', $randId);
17
+file_put_contents(sys_get_temp_dir().'/phpunit_rand_id.txt', $randId);
18 18
 
19 19
 $client = new xmlrpc_client($baseurl);
20 20
 $client->setCookie('PHPUNIT_RANDOM_TEST_ID', $randId);
@@ -22,11 +22,11 @@  discard block
 block discarded – undo
22 22
 $req = new xmlrpcmsg('system.listMethods', array());
23 23
 $resp = $client->send($req);
24 24
 if ($resp->faultCode() !== 0) {
25
-    unlink(sys_get_temp_dir() . '/phpunit_rand_id.txt');
26
-    throw new \Exception("system.listMethods returned fault " . $resp->faultCode());
25
+    unlink(sys_get_temp_dir().'/phpunit_rand_id.txt');
26
+    throw new \Exception("system.listMethods returned fault ".$resp->faultCode());
27 27
 }
28 28
 echo ". 1/1 (100%)\n\n";
29 29
 
30 30
 echo "OK (1 test, 1 assertion)\n";
31 31
 
32
-unlink(sys_get_temp_dir() . '/phpunit_rand_id.txt');
32
+unlink(sys_get_temp_dir().'/phpunit_rand_id.txt');
Please login to merge, or discard this patch.
tests/09HTTPTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include_once __DIR__ . '/08ServerTest.php';
3
+include_once __DIR__.'/08ServerTest.php';
4 4
 
5 5
 /**
6 6
  * Tests which stress http features of the library.
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     {
29 29
         $methods = array();
30 30
         // as long as we are descendants, get_class_methods will list private/protected methods
31
-        foreach(get_class_methods('ServerTest') as $method)
31
+        foreach (get_class_methods('ServerTest') as $method)
32 32
         {
33 33
             if (strpos($method, 'test') === 0 && !in_array($method, $this->unsafeMethods))
34 34
             {
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
                 preg_match('/ubunutu([0-9]+)/', $output[0], $matches);
331 331
                 $ubuntuVersion = @$matches[1];
332 332
             }
333
-            if ($ubuntuVersion >= 20 && $this->args['SSLVERSION'] != 6) {
333
+            if ($ubuntuVersion>=20 && $this->args['SSLVERSION'] != 6) {
334 334
                 $this->markTestSkipped('HTTPS via Socket known to fail on php less than 7.2 on Ubuntu 20 and higher');
335 335
                 return;
336 336
             }
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
             $this->client->setOption(\PhpXmlRpc\Client::OPT_EXTRA_SOCKET_OPTS,
357 357
                 array('ssl' => array(
358 358
                     // security level is available as of php 7.2.0 + openssl 1.1.0 according to the docs
359
-                    'security_level' => min(1 + $version[1], 5),
359
+                    'security_level' => min(1+$version[1], 5),
360 360
                     // capture_session_meta was deprecated in php 7.0
361 361
                     //'capture_session_meta' => true,
362 362
                 ))
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
         if (version_compare(PHP_VERSION, '8.0', '>=') && $this->args['SSLVERSION'] == 0)
407 407
         {
408 408
             $version = explode('.', PHP_VERSION);
409
-            $this->client->setSSLVersion(min(4 + $version[1], 7));
409
+            $this->client->setSSLVersion(min(4+$version[1], 7));
410 410
         }
411 411
 
412 412
         $this->$method();
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
         // this checks for a non-failed call
623 623
         $time = microtime(true);
624 624
         $this->send($m);
625
-        $time = microtime(true) - $time;
625
+        $time = microtime(true)-$time;
626 626
         $this->assertGreaterThan(1.0, $time);
627 627
         $this->assertLessThan(2.0, $time);
628 628
 
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
         $m = new xmlrpcmsg('tests.sleep', array(new xmlrpcval(5, 'int')));
631 631
         $time = microtime(true);
632 632
         $r = $this->send($m, array(0, PhpXmlRpc\PhpXmlRpc::$xmlrpcerr['http_error'], PhpXmlRpc\PhpXmlRpc::$xmlrpcerr['curl_fail']));
633
-        $time = microtime(true) - $time;
633
+        $time = microtime(true)-$time;
634 634
         $this->assertGreaterThan(2.0, $time);
635 635
         $this->assertLessThan(4.0, $time);
636 636
 
@@ -650,7 +650,7 @@  discard block
 block discarded – undo
650 650
         $this->addQueryParams(array('SLOW_LORIS' => 1));
651 651
         $time = microtime(true);
652 652
         $this->send($m, array(0, PhpXmlRpc\PhpXmlRpc::$xmlrpcerr['http_error'], PhpXmlRpc\PhpXmlRpc::$xmlrpcerr['curl_fail']));
653
-        $time = microtime(true) - $time;
653
+        $time = microtime(true)-$time;
654 654
         $this->assertGreaterThan(2.0, $time);
655 655
         $this->assertLessThan(4.0, $time);
656 656
     }
Please login to merge, or discard this patch.
src/Client.php 1 patch
Spacing   +108 added lines, -108 removed lines patch added patch discarded remove patch
@@ -337,10 +337,10 @@  discard block
 block discarded – undo
337 337
             $server = $parts['host'];
338 338
             $path = isset($parts['path']) ? $parts['path'] : '';
339 339
             if (isset($parts['query'])) {
340
-                $path .= '?' . $parts['query'];
340
+                $path .= '?'.$parts['query'];
341 341
             }
342 342
             if (isset($parts['fragment'])) {
343
-                $path .= '#' . $parts['fragment'];
343
+                $path .= '#'.$parts['fragment'];
344 344
             }
345 345
             if (isset($parts['port'])) {
346 346
                 $port = $parts['port'];
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
             }
357 357
         }
358 358
         if ($path == '' || $path[0] != '/') {
359
-            $this->path = '/' . $path;
359
+            $this->path = '/'.$path;
360 360
         } else {
361 361
             $this->path = $path;
362 362
         }
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
         //$this->accepted_charset_encodings = $ch->knownCharsets();
389 389
 
390 390
         // initialize user_agent string
391
-        $this->user_agent = PhpXmlRpc::$xmlrpcName . ' ' . PhpXmlRpc::$xmlrpcVersion;
391
+        $this->user_agent = PhpXmlRpc::$xmlrpcName.' '.PhpXmlRpc::$xmlrpcVersion;
392 392
     }
393 393
 
394 394
     /**
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
      */
561 561
     public function setSSLVerifyPeer($i)
562 562
     {
563
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
563
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
564 564
 
565 565
         $this->verifypeer = $i;
566 566
         return $this;
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
      */
578 578
     public function setSSLVerifyHost($i)
579 579
     {
580
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
580
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
581 581
 
582 582
         $this->verifyhost = $i;
583 583
         return $this;
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
      */
595 595
     public function setSSLVersion($i)
596 596
     {
597
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
597
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
598 598
 
599 599
         $this->sslversion = $i;
600 600
         return $this;
@@ -659,7 +659,7 @@  discard block
 block discarded – undo
659 659
      */
660 660
     public function setRequestCompression($compMethod)
661 661
     {
662
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
662
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
663 663
 
664 664
         $this->request_compression = $compMethod;
665 665
         return $this;
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
      */
710 710
     public function setCurlOptions($options)
711 711
     {
712
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
712
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
713 713
 
714 714
         $this->extracurlopts = $options;
715 715
         return $this;
@@ -722,7 +722,7 @@  discard block
 block discarded – undo
722 722
      */
723 723
     public function setUseCurl($useCurlMode)
724 724
     {
725
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
725
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
726 726
 
727 727
         $this->use_curl = $useCurlMode;
728 728
         return $this;
@@ -740,7 +740,7 @@  discard block
 block discarded – undo
740 740
      */
741 741
     public function setUserAgent($agentString)
742 742
     {
743
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
743
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
744 744
 
745 745
         $this->user_agent = $agentString;
746 746
         return $this;
@@ -772,12 +772,12 @@  discard block
 block discarded – undo
772 772
             }
773 773
         }
774 774
 
775
-        $url = $this->method . '://' . $this->server;
775
+        $url = $this->method.'://'.$this->server;
776 776
         if ($this->port == 0 || ($this->port == 80 && in_array($this->method, array('http', 'http10', 'http11', 'h2c'))) ||
777 777
             ($this->port == 443 && in_array($this->method, array('https', 'h2')))) {
778
-            return $url . $this->path;
778
+            return $url.$this->path;
779 779
         } else {
780
-            return $url . ':' . $this->port . $this->path;
780
+            return $url.':'.$this->port.$this->path;
781 781
         }
782 782
     }
783 783
 
@@ -820,7 +820,7 @@  discard block
 block discarded – undo
820 820
     public function send($req, $timeout = 0, $method = '')
821 821
     {
822 822
         if ($method !== '' || $timeout !== 0) {
823
-            $this->logDeprecation("Using non-default values for arguments 'method' and 'timeout' when calling method " . __METHOD__ . ' is deprecated');
823
+            $this->logDeprecation("Using non-default values for arguments 'method' and 'timeout' when calling method ".__METHOD__.' is deprecated');
824 824
         }
825 825
 
826 826
         // if user does not specify http protocol, use native method of this client
@@ -944,7 +944,7 @@  discard block
 block discarded – undo
944 944
                     $payload = $a;
945 945
                     $encodingHdr = "Content-Encoding: gzip\r\n";
946 946
                 } else {
947
-                    $this->getLogger()->warning('XML-RPC: ' . __METHOD__ . ': gzencode failure in compressing request');
947
+                    $this->getLogger()->warning('XML-RPC: '.__METHOD__.': gzencode failure in compressing request');
948 948
                 }
949 949
             } else if (function_exists('gzcompress')) {
950 950
                 $a = @gzcompress($payload);
@@ -952,14 +952,14 @@  discard block
 block discarded – undo
952 952
                     $payload = $a;
953 953
                     $encodingHdr = "Content-Encoding: deflate\r\n";
954 954
                 } else {
955
-                    $this->getLogger()->warning('XML-RPC: ' . __METHOD__ . ': gzcompress failure in compressing request');
955
+                    $this->getLogger()->warning('XML-RPC: '.__METHOD__.': gzcompress failure in compressing request');
956 956
                 }
957 957
             } else {
958
-                $this->getLogger()->warning('XML-RPC: ' . __METHOD__ . ': desired request compression method is unsupported by this PHP install');
958
+                $this->getLogger()->warning('XML-RPC: '.__METHOD__.': desired request compression method is unsupported by this PHP install');
959 959
             }
960 960
         } else {
961 961
             if ($opts['request_compression'] != '') {
962
-                $this->getLogger()->warning('XML-RPC: ' . __METHOD__ . ': desired request compression method is unsupported');
962
+                $this->getLogger()->warning('XML-RPC: '.__METHOD__.': desired request compression method is unsupported');
963 963
             }
964 964
         }
965 965
 
@@ -967,16 +967,16 @@  discard block
 block discarded – undo
967 967
         $credentials = '';
968 968
         if ($opts['username'] != '') {
969 969
             if ($opts['authtype'] != 1) {
970
-                $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': warning. Only Basic auth is supported with HTTP 1.0');
970
+                $this->getLogger()->error('XML-RPC: '.__METHOD__.': warning. Only Basic auth is supported with HTTP 1.0');
971 971
                 return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['unsupported_option'],
972
-                    PhpXmlRpc::$xmlrpcerr['unsupported_option'] . ': only Basic auth is supported with HTTP 1.0');
972
+                    PhpXmlRpc::$xmlrpcerr['unsupported_option'].': only Basic auth is supported with HTTP 1.0');
973 973
             }
974
-            $credentials = 'Authorization: Basic ' . base64_encode($opts['username'] . ':' . $opts['password']) . "\r\n";
974
+            $credentials = 'Authorization: Basic '.base64_encode($opts['username'].':'.$opts['password'])."\r\n";
975 975
         }
976 976
 
977 977
         $acceptedEncoding = '';
978 978
         if (is_array($opts['accepted_compression']) && count($opts['accepted_compression'])) {
979
-            $acceptedEncoding = 'Accept-Encoding: ' . implode(', ', $opts['accepted_compression']) . "\r\n";
979
+            $acceptedEncoding = 'Accept-Encoding: '.implode(', ', $opts['accepted_compression'])."\r\n";
980 980
         }
981 981
 
982 982
         if ($port == 0) {
@@ -997,21 +997,21 @@  discard block
 block discarded – undo
997 997
             } elseif ($method === 'h2') {
998 998
                 $protocol = 'https';
999 999
             } else if (strpos($protocol, ':') !== false) {
1000
-                $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ": warning - attempted hacking attempt?. The protocol requested for the call is: '$protocol'");
1001
-                return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['unsupported_option'], PhpXmlRpc::$xmlrpcerr['unsupported_option'] .
1000
+                $this->getLogger()->error('XML-RPC: '.__METHOD__.": warning - attempted hacking attempt?. The protocol requested for the call is: '$protocol'");
1001
+                return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['unsupported_option'], PhpXmlRpc::$xmlrpcerr['unsupported_option'].
1002 1002
                     " attempted hacking attempt?. The protocol requested for the call is: '$protocol'");
1003 1003
             }
1004 1004
             /// @todo this does not work atm (tested at least with an http proxy forwarding to an https server) - we
1005 1005
             ///       should implement the CONNECT protocol
1006
-            $uri = $protocol . '://' . $server . ':' . $port . $path;
1006
+            $uri = $protocol.'://'.$server.':'.$port.$path;
1007 1007
             if ($opts['proxy_user'] != '') {
1008 1008
                 if ($opts['proxy_authtype'] != 1) {
1009
-                    $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': warning. Only Basic auth to proxy is supported with HTTP 1.0');
1009
+                    $this->getLogger()->error('XML-RPC: '.__METHOD__.': warning. Only Basic auth to proxy is supported with HTTP 1.0');
1010 1010
                     return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['unsupported_option'],
1011
-                        PhpXmlRpc::$xmlrpcerr['unsupported_option'] . ': only Basic auth to proxy is supported with socket transport');
1011
+                        PhpXmlRpc::$xmlrpcerr['unsupported_option'].': only Basic auth to proxy is supported with socket transport');
1012 1012
                 }
1013
-                $proxyCredentials = 'Proxy-Authorization: Basic ' . base64_encode($opts['proxy_user'] . ':' .
1014
-                    $opts['proxy_pass']) . "\r\n";
1013
+                $proxyCredentials = 'Proxy-Authorization: Basic '.base64_encode($opts['proxy_user'].':'.
1014
+                    $opts['proxy_pass'])."\r\n";
1015 1015
             }
1016 1016
         } else {
1017 1017
             $connectServer = $server;
@@ -1028,14 +1028,14 @@  discard block
 block discarded – undo
1028 1028
             $version = '';
1029 1029
             foreach ($opts['cookies'] as $name => $cookie) {
1030 1030
                 /// @todo should we sanitize the cookie value on behalf of the user? See setCookie comments
1031
-                $cookieHeader .= ' ' . $name . '=' . $cookie['value'] . ";";
1031
+                $cookieHeader .= ' '.$name.'='.$cookie['value'].";";
1032 1032
             }
1033
-            $cookieHeader = 'Cookie:' . $version . substr($cookieHeader, 0, -1) . "\r\n";
1033
+            $cookieHeader = 'Cookie:'.$version.substr($cookieHeader, 0, -1)."\r\n";
1034 1034
         }
1035 1035
 
1036 1036
         $extraHeaders = '';
1037 1037
         if (is_array($this->extra_headers) && $this->extra_headers) {
1038
-            $extraHeaders = implode("\r\n", $this->extra_headers) . "\r\n";
1038
+            $extraHeaders = implode("\r\n", $this->extra_headers)."\r\n";
1039 1039
         }
1040 1040
 
1041 1041
         // omit port if default
@@ -1043,24 +1043,24 @@  discard block
 block discarded – undo
1043 1043
         if (($port == 80 && in_array($method, array('http', 'http10', 'http11'))) || ($port == 443 && $method == 'https')) {
1044 1044
             $port = '';
1045 1045
         } else {
1046
-            $port = ':' . $port;
1047
-        }
1048
-
1049
-        $op = 'POST ' . $uri . " HTTP/1.0\r\n" .
1050
-            'User-Agent: ' . $opts['user_agent'] . "\r\n" .
1051
-            'Host: ' . $server . $port . "\r\n" .
1052
-            $credentials .
1053
-            $proxyCredentials .
1054
-            $acceptedEncoding .
1055
-            $encodingHdr .
1056
-            'Accept-Charset: ' . implode(',', $opts['accepted_charset_encodings']) . "\r\n" .
1057
-            $cookieHeader .
1058
-            'Content-Type: ' . $req->getContentType() . "\r\n" .
1059
-            $extraHeaders .
1060
-            'Content-Length: ' . strlen($payload) . "\r\n\r\n" .
1046
+            $port = ':'.$port;
1047
+        }
1048
+
1049
+        $op = 'POST '.$uri." HTTP/1.0\r\n".
1050
+            'User-Agent: '.$opts['user_agent']."\r\n".
1051
+            'Host: '.$server.$port."\r\n".
1052
+            $credentials.
1053
+            $proxyCredentials.
1054
+            $acceptedEncoding.
1055
+            $encodingHdr.
1056
+            'Accept-Charset: '.implode(',', $opts['accepted_charset_encodings'])."\r\n".
1057
+            $cookieHeader.
1058
+            'Content-Type: '.$req->getContentType()."\r\n".
1059
+            $extraHeaders.
1060
+            'Content-Length: '.strlen($payload)."\r\n\r\n".
1061 1061
             $payload;
1062 1062
 
1063
-        if ($opts['debug'] > 1) {
1063
+        if ($opts['debug']>1) {
1064 1064
             $this->getLogger()->debug("---SENDING---\n$op\n---END---");
1065 1065
         }
1066 1066
 
@@ -1089,13 +1089,13 @@  discard block
 block discarded – undo
1089 1089
                 ///      https://www.php.net/manual/en/function.stream-socket-enable-crypto.php
1090 1090
                 ///      https://www.php.net/manual/en/migration56.openssl.php,
1091 1091
                 ///      https://wiki.php.net/rfc/improved-tls-constants
1092
-                switch($opts['sslversion']) {
1092
+                switch ($opts['sslversion']) {
1093 1093
                     case 1: // TLSv1x
1094 1094
                         if (version_compare(PHP_VERSION, '7.2.0', '>=')) {
1095 1095
                             $contextOptions['ssl']['crypto_method'] = STREAM_CRYPTO_METHOD_TLS_CLIENT;
1096 1096
                         } else {
1097 1097
                             return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['unsupported_option'],
1098
-                                PhpXmlRpc::$xmlrpcerr['unsupported_option'] . ': TLS-any only is supported with PHP 7.2 or later');
1098
+                                PhpXmlRpc::$xmlrpcerr['unsupported_option'].': TLS-any only is supported with PHP 7.2 or later');
1099 1099
                         }
1100 1100
                         break;
1101 1101
                     case 2: // SSLv2
@@ -1118,12 +1118,12 @@  discard block
 block discarded – undo
1118 1118
                             $contextOptions['ssl']['crypto_method'] = STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT;
1119 1119
                         } else {
1120 1120
                             return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['unsupported_option'],
1121
-                                PhpXmlRpc::$xmlrpcerr['unsupported_option'] . ': TLS-1.3 only is supported with PHP 7.4 or later');
1121
+                                PhpXmlRpc::$xmlrpcerr['unsupported_option'].': TLS-1.3 only is supported with PHP 7.4 or later');
1122 1122
                         }
1123 1123
                         break;
1124 1124
                     default:
1125 1125
                         return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['unsupported_option'],
1126
-                            PhpXmlRpc::$xmlrpcerr['unsupported_option'] . ': Unsupported required TLS version');
1126
+                            PhpXmlRpc::$xmlrpcerr['unsupported_option'].': Unsupported required TLS version');
1127 1127
                 }
1128 1128
             }
1129 1129
         }
@@ -1136,7 +1136,7 @@  discard block
 block discarded – undo
1136 1136
 
1137 1137
         $context = stream_context_create($contextOptions);
1138 1138
 
1139
-        if ($opts['timeout'] <= 0) {
1139
+        if ($opts['timeout']<=0) {
1140 1140
             $connectTimeout = ini_get('default_socket_timeout');
1141 1141
         } else {
1142 1142
             $connectTimeout = $opts['timeout'];
@@ -1155,7 +1155,7 @@  discard block
 block discarded – undo
1155 1155
         $fp = @stream_socket_client("$transport://$connectServer:$connectPort", $this->errno, $this->errstr, $connectTimeout,
1156 1156
             STREAM_CLIENT_CONNECT, $context);
1157 1157
         if ($fp) {
1158
-            if ($opts['timeout'] > 0) {
1158
+            if ($opts['timeout']>0) {
1159 1159
                 stream_set_timeout($fp, $opts['timeout'], 0);
1160 1160
             }
1161 1161
         } else {
@@ -1164,8 +1164,8 @@  discard block
 block discarded – undo
1164 1164
                 $this->errstr = $err['message'];
1165 1165
             }
1166 1166
 
1167
-            $this->errstr = 'Connect error: ' . $this->errstr;
1168
-            return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['http_error'], $this->errstr . ' (' . $this->errno . ')');
1167
+            $this->errstr = 'Connect error: '.$this->errstr;
1168
+            return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['http_error'], $this->errstr.' ('.$this->errno.')');
1169 1169
         }
1170 1170
 
1171 1171
         if (!fputs($fp, $op, strlen($op))) {
@@ -1245,19 +1245,19 @@  discard block
 block discarded – undo
1245 1245
             $opts['keepalive'], $opts['key'], $opts['keypass'], $opts['sslversion']);
1246 1246
 
1247 1247
         if (!$curl) {
1248
-            return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['curl_fail'], PhpXmlRpc::$xmlrpcstr['curl_fail'] .
1248
+            return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['curl_fail'], PhpXmlRpc::$xmlrpcstr['curl_fail'].
1249 1249
                 ': error during curl initialization. Check php error log for details');
1250 1250
         }
1251 1251
 
1252 1252
         $result = curl_exec($curl);
1253 1253
 
1254
-        if ($opts['debug'] > 1) {
1254
+        if ($opts['debug']>1) {
1255 1255
             $message = "---CURL INFO---\n";
1256 1256
             foreach (curl_getinfo($curl) as $name => $val) {
1257 1257
                 if (is_array($val)) {
1258 1258
                     $val = implode("\n", $val);
1259 1259
                 }
1260
-                $message .= $name . ': ' . $val . "\n";
1260
+                $message .= $name.': '.$val."\n";
1261 1261
             }
1262 1262
             $message .= '---END---';
1263 1263
             $this->getLogger()->debug($message);
@@ -1267,8 +1267,8 @@  discard block
 block discarded – undo
1267 1267
             /// @todo we should use a better check here - what if we get back '' or '0'?
1268 1268
 
1269 1269
             $this->errstr = 'no response';
1270
-            $resp = new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['curl_fail'], PhpXmlRpc::$xmlrpcstr['curl_fail'] .
1271
-                ': ' . curl_error($curl));
1270
+            $resp = new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['curl_fail'], PhpXmlRpc::$xmlrpcstr['curl_fail'].
1271
+                ': '.curl_error($curl));
1272 1272
             curl_close($curl);
1273 1273
             if ($opts['keepalive']) {
1274 1274
                 $this->xmlrpc_curl_handle = null;
@@ -1326,7 +1326,7 @@  discard block
 block discarded – undo
1326 1326
                     $payload = $a;
1327 1327
                     $encodingHdr = 'Content-Encoding: gzip';
1328 1328
                 } else {
1329
-                    $this->getLogger()->warning('XML-RPC: ' . __METHOD__ . ': gzencode failure in compressing request');
1329
+                    $this->getLogger()->warning('XML-RPC: '.__METHOD__.': gzencode failure in compressing request');
1330 1330
                 }
1331 1331
             } else if (function_exists('gzcompress')) {
1332 1332
                 $a = @gzcompress($payload);
@@ -1334,14 +1334,14 @@  discard block
 block discarded – undo
1334 1334
                     $payload = $a;
1335 1335
                     $encodingHdr = 'Content-Encoding: deflate';
1336 1336
                 } else {
1337
-                    $this->getLogger()->warning('XML-RPC: ' . __METHOD__ . ': gzcompress failure in compressing request');
1337
+                    $this->getLogger()->warning('XML-RPC: '.__METHOD__.': gzcompress failure in compressing request');
1338 1338
                 }
1339 1339
             } else {
1340
-                $this->getLogger()->warning('XML-RPC: ' . __METHOD__ . ': desired request compression method is unsupported by this PHP install');
1340
+                $this->getLogger()->warning('XML-RPC: '.__METHOD__.': desired request compression method is unsupported by this PHP install');
1341 1341
             }
1342 1342
         } else {
1343 1343
             if ($opts['request_compression'] != '') {
1344
-                $this->getLogger()->warning('XML-RPC: ' . __METHOD__ . ': desired request compression method is unsupported');
1344
+                $this->getLogger()->warning('XML-RPC: '.__METHOD__.': desired request compression method is unsupported');
1345 1345
             }
1346 1346
         }
1347 1347
 
@@ -1355,12 +1355,12 @@  discard block
 block discarded – undo
1355 1355
                     // http, https
1356 1356
                     $protocol = $method;
1357 1357
                     if (strpos($protocol, ':') !== false) {
1358
-                        $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ": warning - attempted hacking attempt?. The curl protocol requested for the call is: '$protocol'");
1358
+                        $this->getLogger()->error('XML-RPC: '.__METHOD__.": warning - attempted hacking attempt?. The curl protocol requested for the call is: '$protocol'");
1359 1359
                         return false;
1360 1360
                     }
1361 1361
                 }
1362 1362
             }
1363
-            $curl = curl_init($protocol . '://' . $server . ':' . $port . $path);
1363
+            $curl = curl_init($protocol.'://'.$server.':'.$port.$path);
1364 1364
             if (!$curl) {
1365 1365
                 return false;
1366 1366
             }
@@ -1374,7 +1374,7 @@  discard block
 block discarded – undo
1374 1374
         // results into variable
1375 1375
         curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
1376 1376
 
1377
-        if ($opts['debug'] > 1) {
1377
+        if ($opts['debug']>1) {
1378 1378
             curl_setopt($curl, CURLOPT_VERBOSE, true);
1379 1379
             /// @todo redirect curlopt_stderr to some stream which can be piped to the logger
1380 1380
         }
@@ -1399,7 +1399,7 @@  discard block
 block discarded – undo
1399 1399
             }
1400 1400
         }
1401 1401
         // extra headers
1402
-        $headers = array('Content-Type: ' . $req->getContentType(), 'Accept-Charset: ' . implode(',', $opts['accepted_charset_encodings']));
1402
+        $headers = array('Content-Type: '.$req->getContentType(), 'Accept-Charset: '.implode(',', $opts['accepted_charset_encodings']));
1403 1403
         // if no keepalive is wanted, let the server know it in advance
1404 1404
         if (!$opts['keepalive']) {
1405 1405
             $headers[] = 'Connection: close';
@@ -1435,7 +1435,7 @@  discard block
 block discarded – undo
1435 1435
                 if (defined('CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE')) {
1436 1436
                     curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE);
1437 1437
                 } else {
1438
-                    $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': warning. HTTP2 is not supported by the current PHP/curl install');
1438
+                    $this->getLogger()->error('XML-RPC: '.__METHOD__.': warning. HTTP2 is not supported by the current PHP/curl install');
1439 1439
                     curl_close($curl);
1440 1440
                     return false;
1441 1441
                 }
@@ -1446,11 +1446,11 @@  discard block
 block discarded – undo
1446 1446
         }
1447 1447
 
1448 1448
         if ($opts['username'] && $opts['password']) {
1449
-            curl_setopt($curl, CURLOPT_USERPWD, $opts['username'] . ':' . $opts['password']);
1449
+            curl_setopt($curl, CURLOPT_USERPWD, $opts['username'].':'.$opts['password']);
1450 1450
             if (defined('CURLOPT_HTTPAUTH')) {
1451 1451
                 curl_setopt($curl, CURLOPT_HTTPAUTH, $opts['authtype']);
1452 1452
             } elseif ($opts['authtype'] != 1) {
1453
-                $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': warning. Only Basic auth is supported by the current PHP/curl install');
1453
+                $this->getLogger()->error('XML-RPC: '.__METHOD__.': warning. Only Basic auth is supported by the current PHP/curl install');
1454 1454
                 curl_close($curl);
1455 1455
                 return false;
1456 1456
             }
@@ -1495,13 +1495,13 @@  discard block
 block discarded – undo
1495 1495
             if ($opts['proxyport'] == 0) {
1496 1496
                 $opts['proxyport'] = 8080; // NB: even for HTTPS, local connection is on port 8080
1497 1497
             }
1498
-            curl_setopt($curl, CURLOPT_PROXY, $opts['proxy'] . ':' . $opts['proxyport']);
1498
+            curl_setopt($curl, CURLOPT_PROXY, $opts['proxy'].':'.$opts['proxyport']);
1499 1499
             if ($opts['proxy_user']) {
1500
-                curl_setopt($curl, CURLOPT_PROXYUSERPWD, $opts['proxy_user'] . ':' . $opts['proxy_pass']);
1500
+                curl_setopt($curl, CURLOPT_PROXYUSERPWD, $opts['proxy_user'].':'.$opts['proxy_pass']);
1501 1501
                 if (defined('CURLOPT_PROXYAUTH')) {
1502 1502
                     curl_setopt($curl, CURLOPT_PROXYAUTH, $opts['proxy_authtype']);
1503 1503
                 } elseif ($opts['proxy_authtype'] != 1) {
1504
-                    $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': warning. Only Basic auth to proxy is supported by the current PHP/curl install');
1504
+                    $this->getLogger()->error('XML-RPC: '.__METHOD__.': warning. Only Basic auth to proxy is supported by the current PHP/curl install');
1505 1505
                     curl_close($curl);
1506 1506
                     return false;
1507 1507
                 }
@@ -1513,7 +1513,7 @@  discard block
 block discarded – undo
1513 1513
         if (count($opts['cookies'])) {
1514 1514
             $cookieHeader = '';
1515 1515
             foreach ($opts['cookies'] as $name => $cookie) {
1516
-                $cookieHeader .= $name . '=' . $cookie['value'] . '; ';
1516
+                $cookieHeader .= $name.'='.$cookie['value'].'; ';
1517 1517
             }
1518 1518
             curl_setopt($curl, CURLOPT_COOKIE, substr($cookieHeader, 0, -2));
1519 1519
         }
@@ -1522,7 +1522,7 @@  discard block
 block discarded – undo
1522 1522
             curl_setopt($curl, $opt, $val);
1523 1523
         }
1524 1524
 
1525
-        if ($opts['debug'] > 1) {
1525
+        if ($opts['debug']>1) {
1526 1526
             $this->getLogger()->debug("---SENDING---\n$payload\n---END---");
1527 1527
         }
1528 1528
 
@@ -1623,7 +1623,7 @@  discard block
 block discarded – undo
1623 1623
             $call['methodName'] = new Value($req->method(), 'string');
1624 1624
             $numParams = $req->getNumParams();
1625 1625
             $params = array();
1626
-            for ($i = 0; $i < $numParams; $i++) {
1626
+            for ($i = 0; $i<$numParams; $i++) {
1627 1627
                 $params[$i] = $req->getParam($i);
1628 1628
             }
1629 1629
             $call['params'] = new Value($params, 'array');
@@ -1645,7 +1645,7 @@  discard block
 block discarded – undo
1645 1645
         $response = array();
1646 1646
 
1647 1647
         if ($this->return_type == 'xml') {
1648
-            for ($i = 0; $i < count($reqs); $i++) {
1648
+            for ($i = 0; $i<count($reqs); $i++) {
1649 1649
                 $response[] = new static::$responseClass($rets, 0, '', 'xml', $result->httpResponse());
1650 1650
             }
1651 1651
 
@@ -1653,21 +1653,21 @@  discard block
 block discarded – undo
1653 1653
             if (!is_array($rets)) {
1654 1654
                 // bad return type from system.multicall
1655 1655
                 return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1656
-                    PhpXmlRpc::$xmlrpcstr['multicall_error'] . ': not an array', 'phpvals', $result->httpResponse());
1656
+                    PhpXmlRpc::$xmlrpcstr['multicall_error'].': not an array', 'phpvals', $result->httpResponse());
1657 1657
             }
1658 1658
             $numRets = count($rets);
1659 1659
             if ($numRets != count($reqs)) {
1660 1660
                 // wrong number of return values.
1661 1661
                 return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1662
-                    PhpXmlRpc::$xmlrpcstr['multicall_error'] . ': incorrect number of responses', 'phpvals',
1662
+                    PhpXmlRpc::$xmlrpcstr['multicall_error'].': incorrect number of responses', 'phpvals',
1663 1663
                     $result->httpResponse());
1664 1664
             }
1665 1665
 
1666
-            for ($i = 0; $i < $numRets; $i++) {
1666
+            for ($i = 0; $i<$numRets; $i++) {
1667 1667
                 $val = $rets[$i];
1668 1668
                 if (!is_array($val)) {
1669 1669
                     return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1670
-                        PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i is not an array or struct",
1670
+                        PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i is not an array or struct",
1671 1671
                         'phpvals', $result->httpResponse());
1672 1672
                 }
1673 1673
                 switch (count($val)) {
@@ -1675,7 +1675,7 @@  discard block
 block discarded – undo
1675 1675
                         if (!isset($val[0])) {
1676 1676
                             // Bad value
1677 1677
                             return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1678
-                                PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has no value",
1678
+                                PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has no value",
1679 1679
                                 'phpvals', $result->httpResponse());
1680 1680
                         }
1681 1681
                         // Normal return value
@@ -1687,20 +1687,20 @@  discard block
 block discarded – undo
1687 1687
                         if (!is_int($code)) {
1688 1688
                             /// @todo should we check that it is != 0?
1689 1689
                             return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1690
-                                PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has invalid or no faultCode",
1690
+                                PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has invalid or no faultCode",
1691 1691
                                 'phpvals', $result->httpResponse());
1692 1692
                         }
1693 1693
                         $str = @$val['faultString'];
1694 1694
                         if (!is_string($str)) {
1695 1695
                             return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1696
-                                PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has invalid or no FaultString",
1696
+                                PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has invalid or no FaultString",
1697 1697
                                 'phpvals', $result->httpResponse());
1698 1698
                         }
1699 1699
                         $response[$i] = new static::$responseClass(0, $code, $str, 'phpvals', $result->httpResponse());
1700 1700
                         break;
1701 1701
                     default:
1702 1702
                         return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1703
-                            PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has too many items",
1703
+                            PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has too many items",
1704 1704
                             'phpvals', $result->httpResponse());
1705 1705
                 }
1706 1706
             }
@@ -1709,14 +1709,14 @@  discard block
 block discarded – undo
1709 1709
             // return type == 'xmlrpcvals'
1710 1710
             if ($rets->kindOf() != 'array') {
1711 1711
                 return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1712
-                    PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i is not an array", 'xmlrpcvals',
1712
+                    PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i is not an array", 'xmlrpcvals',
1713 1713
                     $result->httpResponse());
1714 1714
             }
1715 1715
             $numRets = $rets->count();
1716 1716
             if ($numRets != count($reqs)) {
1717 1717
                 // wrong number of return values.
1718 1718
                 return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1719
-                    PhpXmlRpc::$xmlrpcstr['multicall_error'] . ': incorrect number of responses', 'xmlrpcvals',
1719
+                    PhpXmlRpc::$xmlrpcstr['multicall_error'].': incorrect number of responses', 'xmlrpcvals',
1720 1720
                     $result->httpResponse());
1721 1721
             }
1722 1722
 
@@ -1725,7 +1725,7 @@  discard block
 block discarded – undo
1725 1725
                     case 'array':
1726 1726
                         if ($val->count() != 1) {
1727 1727
                             return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1728
-                                PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has too many items",
1728
+                                PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has too many items",
1729 1729
                                 'phpvals', $result->httpResponse());
1730 1730
                         }
1731 1731
                         // Normal return value
@@ -1734,28 +1734,28 @@  discard block
 block discarded – undo
1734 1734
                     case 'struct':
1735 1735
                         if ($val->count() != 2) {
1736 1736
                             return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1737
-                                PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has too many items",
1737
+                                PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has too many items",
1738 1738
                                 'phpvals', $result->httpResponse());
1739 1739
                         }
1740 1740
                         /** @var Value $code */
1741 1741
                         $code = $val['faultCode'];
1742 1742
                         if ($code->kindOf() != 'scalar' || $code->scalarTyp() != 'int') {
1743 1743
                             return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1744
-                                PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has invalid or no faultCode",
1744
+                                PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has invalid or no faultCode",
1745 1745
                                 'xmlrpcvals', $result->httpResponse());
1746 1746
                         }
1747 1747
                         /** @var Value $str */
1748 1748
                         $str = $val['faultString'];
1749 1749
                         if ($str->kindOf() != 'scalar' || $str->scalarTyp() != 'string') {
1750 1750
                             return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1751
-                                PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has invalid or no faultCode",
1751
+                                PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has invalid or no faultCode",
1752 1752
                                 'xmlrpcvals', $result->httpResponse());
1753 1753
                         }
1754 1754
                         $response[] = new static::$responseClass(0, $code->scalarVal(), $str->scalarVal(), 'xmlrpcvals', $result->httpResponse());
1755 1755
                         break;
1756 1756
                     default:
1757 1757
                         return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1758
-                            PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i is not an array or struct",
1758
+                            PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i is not an array or struct",
1759 1759
                             'xmlrpcvals', $result->httpResponse());
1760 1760
                 }
1761 1761
             }
@@ -1790,7 +1790,7 @@  discard block
 block discarded – undo
1790 1790
         $authType = 1, $proxyHost = '', $proxyPort = 0, $proxyUsername = '', $proxyPassword = '', $proxyAuthType = 1,
1791 1791
         $method = 'http')
1792 1792
     {
1793
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
1793
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
1794 1794
 
1795 1795
         return $this->sendPayloadSocket($req, $server, $port, $timeout, $username, $password, $authType, null, null,
1796 1796
             null, null, $proxyHost, $proxyPort, $proxyUsername, $proxyPassword, $proxyAuthType, $method);
@@ -1828,7 +1828,7 @@  discard block
 block discarded – undo
1828 1828
         $proxyUsername = '', $proxyPassword = '', $proxyAuthType = 1, $keepAlive = false, $key = '', $keyPass = '',
1829 1829
         $sslVersion = 0)
1830 1830
     {
1831
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
1831
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
1832 1832
 
1833 1833
         return $this->sendPayloadCURL($req, $server, $port, $timeout, $username,
1834 1834
             $password, $authType, $cert, $certPass, $caCert, $caCertDir, $proxyHost, $proxyPort,
@@ -2041,7 +2041,7 @@  discard block
 block discarded – undo
2041 2041
     public function &__get($name)
2042 2042
     {
2043 2043
         if (in_array($name, static::$options)) {
2044
-            $this->logDeprecation('Getting property Client::' . $name . ' is deprecated');
2044
+            $this->logDeprecation('Getting property Client::'.$name.' is deprecated');
2045 2045
             return $this->$name;
2046 2046
         }
2047 2047
 
@@ -2052,12 +2052,12 @@  discard block
 block discarded – undo
2052 2052
             case 'server':
2053 2053
             case 'port':
2054 2054
             case 'path':
2055
-                $this->logDeprecation('Getting property Client::' . $name . ' is deprecated');
2055
+                $this->logDeprecation('Getting property Client::'.$name.' is deprecated');
2056 2056
                 return $this->$name;
2057 2057
             default:
2058 2058
                 /// @todo throw instead? There are very few other places where the lib trigger errors which can potentially reach stdout...
2059 2059
                 $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
2060
-                trigger_error('Undefined property via __get(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_WARNING);
2060
+                trigger_error('Undefined property via __get(): '.$name.' in '.$trace[0]['file'].' on line '.$trace[0]['line'], E_USER_WARNING);
2061 2061
                 $result = null;
2062 2062
                 return $result;
2063 2063
         }
@@ -2066,7 +2066,7 @@  discard block
 block discarded – undo
2066 2066
     public function __set($name, $value)
2067 2067
     {
2068 2068
         if (in_array($name, static::$options)) {
2069
-            $this->logDeprecation('Setting property Client::' . $name . ' is deprecated');
2069
+            $this->logDeprecation('Setting property Client::'.$name.' is deprecated');
2070 2070
             $this->$name = $value;
2071 2071
             return;
2072 2072
         }
@@ -2078,20 +2078,20 @@  discard block
 block discarded – undo
2078 2078
             case 'server':
2079 2079
             case 'port':
2080 2080
             case 'path':
2081
-                $this->logDeprecation('Setting property Client::' . $name . ' is deprecated');
2081
+                $this->logDeprecation('Setting property Client::'.$name.' is deprecated');
2082 2082
                 $this->$name = $value;
2083 2083
                 return;
2084 2084
             default:
2085 2085
                 /// @todo throw instead? There are very few other places where the lib trigger errors which can potentially reach stdout...
2086 2086
                 $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
2087
-                trigger_error('Undefined property via __set(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_WARNING);
2087
+                trigger_error('Undefined property via __set(): '.$name.' in '.$trace[0]['file'].' on line '.$trace[0]['line'], E_USER_WARNING);
2088 2088
         }
2089 2089
     }
2090 2090
 
2091 2091
     public function __isset($name)
2092 2092
     {
2093 2093
         if (in_array($name, static::$options)) {
2094
-            $this->logDeprecation('Checking property Client::' . $name . ' is deprecated');
2094
+            $this->logDeprecation('Checking property Client::'.$name.' is deprecated');
2095 2095
             return isset($this->$name);
2096 2096
         }
2097 2097
 
@@ -2102,7 +2102,7 @@  discard block
 block discarded – undo
2102 2102
             case 'server':
2103 2103
             case 'port':
2104 2104
             case 'path':
2105
-                $this->logDeprecation('Checking property Client::' . $name . ' is deprecated');
2105
+                $this->logDeprecation('Checking property Client::'.$name.' is deprecated');
2106 2106
                 return isset($this->$name);
2107 2107
             default:
2108 2108
                 return false;
@@ -2112,7 +2112,7 @@  discard block
 block discarded – undo
2112 2112
     public function __unset($name)
2113 2113
     {
2114 2114
         if (in_array($name, static::$options)) {
2115
-            $this->logDeprecation('Unsetting property Client::' . $name . ' is deprecated');
2115
+            $this->logDeprecation('Unsetting property Client::'.$name.' is deprecated');
2116 2116
             unset($this->$name);
2117 2117
             return;
2118 2118
         }
@@ -2124,13 +2124,13 @@  discard block
 block discarded – undo
2124 2124
             case 'server':
2125 2125
             case 'port':
2126 2126
             case 'path':
2127
-                $this->logDeprecation('Unsetting property Client::' . $name . ' is deprecated');
2127
+                $this->logDeprecation('Unsetting property Client::'.$name.' is deprecated');
2128 2128
                 unset($this->$name);
2129 2129
                 return;
2130 2130
             default:
2131 2131
                 /// @todo throw instead? There are very few other places where the lib trigger errors which can potentially reach stdout...
2132 2132
                 $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
2133
-                trigger_error('Undefined property via __unset(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_WARNING);
2133
+                trigger_error('Undefined property via __unset(): '.$name.' in '.$trace[0]['file'].' on line '.$trace[0]['line'], E_USER_WARNING);
2134 2134
         }
2135 2135
     }
2136 2136
 }
Please login to merge, or discard this patch.