Passed
Push — master ( b614c9...c576cf )
by Gaetano
08:09
created
src/Client.php 1 patch
Spacing   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -194,10 +194,10 @@  discard block
 block discarded – undo
194 194
             $server = $parts['host'];
195 195
             $path = isset($parts['path']) ? $parts['path'] : '';
196 196
             if (isset($parts['query'])) {
197
-                $path .= '?' . $parts['query'];
197
+                $path .= '?'.$parts['query'];
198 198
             }
199 199
             if (isset($parts['fragment'])) {
200
-                $path .= '#' . $parts['fragment'];
200
+                $path .= '#'.$parts['fragment'];
201 201
             }
202 202
             if (isset($parts['port'])) {
203 203
                 $port = $parts['port'];
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
             }
214 214
         }
215 215
         if ($path == '' || $path[0] != '/') {
216
-            $this->path = '/' . $path;
216
+            $this->path = '/'.$path;
217 217
         } else {
218 218
             $this->path = $path;
219 219
         }
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
         //$this->accepted_charset_encodings = $ch->knownCharsets();
246 246
 
247 247
         // initialize user_agent string
248
-        $this->user_agent = PhpXmlRpc::$xmlrpcName . ' ' . PhpXmlRpc::$xmlrpcVersion;
248
+        $this->user_agent = PhpXmlRpc::$xmlrpcName.' '.PhpXmlRpc::$xmlrpcVersion;
249 249
     }
250 250
 
251 251
     /**
@@ -669,7 +669,7 @@  discard block
 block discarded – undo
669 669
      */
670 670
     protected function sendPayloadHTTP10($req, $server, $port, $timeout = 0, $username = '', $password = '',
671 671
         $authType = 1, $proxyHost = '', $proxyPort = 0, $proxyUsername = '', $proxyPassword = '', $proxyAuthType = 1,
672
-        $method='http')
672
+        $method = 'http')
673 673
     {
674 674
         //trigger_error('Method ' . __METHOD__ . ' is deprecated', E_USER_DEPRECATED);
675 675
 
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
      * @param int $sslVersion
703 703
      * @return Response
704 704
      */
705
-    protected function sendPayloadHTTPS($req, $server, $port, $timeout = 0, $username = '',  $password = '',
705
+    protected function sendPayloadHTTPS($req, $server, $port, $timeout = 0, $username = '', $password = '',
706 706
         $authType = 1, $cert = '', $certPass = '', $caCert = '', $caCertDir = '', $proxyHost = '', $proxyPort = 0,
707 707
         $proxyUsername = '', $proxyPassword = '', $proxyAuthType = 1, $keepAlive = false, $key = '', $keyPass = '',
708 708
         $sslVersion = 0)
@@ -741,7 +741,7 @@  discard block
 block discarded – undo
741 741
      */
742 742
     protected function sendPayloadSocket($req, $server, $port, $timeout = 0, $username = '', $password = '',
743 743
         $authType = 1, $cert = '', $certPass = '', $caCert = '', $caCertDir = '', $proxyHost = '', $proxyPort = 0,
744
-        $proxyUsername = '', $proxyPassword = '', $proxyAuthType = 1, $method='http', $key = '', $keyPass = '',
744
+        $proxyUsername = '', $proxyPassword = '', $proxyAuthType = 1, $method = 'http', $key = '', $keyPass = '',
745 745
         $sslVersion = 0)
746 746
     {
747 747
         /// @todo log a warning if passed an unsupported method
@@ -778,16 +778,16 @@  discard block
 block discarded – undo
778 778
         // thanks to Grant Rauscher <[email protected]> for this
779 779
         $credentials = '';
780 780
         if ($username != '') {
781
-            $credentials = 'Authorization: Basic ' . base64_encode($username . ':' . $password) . "\r\n";
781
+            $credentials = 'Authorization: Basic '.base64_encode($username.':'.$password)."\r\n";
782 782
             if ($authType != 1) {
783 783
                 /// @todo make this a proper error, i.e. return a failure
784
-                $this->getLogger()->errorLog('XML-RPC: ' . __METHOD__ . ': warning. Only Basic auth is supported with HTTP 1.0');
784
+                $this->getLogger()->errorLog('XML-RPC: '.__METHOD__.': warning. Only Basic auth is supported with HTTP 1.0');
785 785
             }
786 786
         }
787 787
 
788 788
         $acceptedEncoding = '';
789 789
         if (is_array($this->accepted_compression) && count($this->accepted_compression)) {
790
-            $acceptedEncoding = 'Accept-Encoding: ' . implode(', ', $this->accepted_compression) . "\r\n";
790
+            $acceptedEncoding = 'Accept-Encoding: '.implode(', ', $this->accepted_compression)."\r\n";
791 791
         }
792 792
 
793 793
         $proxyCredentials = '';
@@ -799,13 +799,13 @@  discard block
 block discarded – undo
799 799
             $connectPort = $proxyPort;
800 800
             $transport = 'tcp';
801 801
             /// @todo check: should we not use https in some cases?
802
-            $uri = 'http://' . $server . ':' . $port . $this->path;
802
+            $uri = 'http://'.$server.':'.$port.$this->path;
803 803
             if ($proxyUsername != '') {
804 804
                 if ($proxyAuthType != 1) {
805 805
                     /// @todo make this a proper error, i.e. return a failure
806
-                    $this->getLogger()->errorLog('XML-RPC: ' . __METHOD__ . ': warning. Only Basic auth to proxy is supported with HTTP 1.0');
806
+                    $this->getLogger()->errorLog('XML-RPC: '.__METHOD__.': warning. Only Basic auth to proxy is supported with HTTP 1.0');
807 807
                 }
808
-                $proxyCredentials = 'Proxy-Authorization: Basic ' . base64_encode($proxyUsername . ':' . $proxyPassword) . "\r\n";
808
+                $proxyCredentials = 'Proxy-Authorization: Basic '.base64_encode($proxyUsername.':'.$proxyPassword)."\r\n";
809 809
             }
810 810
         } else {
811 811
             $connectServer = $server;
@@ -820,45 +820,45 @@  discard block
 block discarded – undo
820 820
             $version = '';
821 821
             foreach ($this->cookies as $name => $cookie) {
822 822
                 if ($cookie['version']) {
823
-                    $version = ' $Version="' . $cookie['version'] . '";';
824
-                    $cookieHeader .= ' ' . $name . '="' . $cookie['value'] . '";';
823
+                    $version = ' $Version="'.$cookie['version'].'";';
824
+                    $cookieHeader .= ' '.$name.'="'.$cookie['value'].'";';
825 825
                     if ($cookie['path']) {
826
-                        $cookieHeader .= ' $Path="' . $cookie['path'] . '";';
826
+                        $cookieHeader .= ' $Path="'.$cookie['path'].'";';
827 827
                     }
828 828
                     if ($cookie['domain']) {
829
-                        $cookieHeader .= ' $Domain="' . $cookie['domain'] . '";';
829
+                        $cookieHeader .= ' $Domain="'.$cookie['domain'].'";';
830 830
                     }
831 831
                     if ($cookie['port']) {
832
-                        $cookieHeader .= ' $Port="' . $cookie['port'] . '";';
832
+                        $cookieHeader .= ' $Port="'.$cookie['port'].'";';
833 833
                     }
834 834
                 } else {
835
-                    $cookieHeader .= ' ' . $name . '=' . $cookie['value'] . ";";
835
+                    $cookieHeader .= ' '.$name.'='.$cookie['value'].";";
836 836
                 }
837 837
             }
838
-            $cookieHeader = 'Cookie:' . $version . substr($cookieHeader, 0, -1) . "\r\n";
838
+            $cookieHeader = 'Cookie:'.$version.substr($cookieHeader, 0, -1)."\r\n";
839 839
         }
840 840
 
841 841
         // omit port if default
842 842
         if (($port == 80 && in_array($method, array('http', 'http10'))) || ($port == 443 && $method == 'https')) {
843
-            $port =  '';
843
+            $port = '';
844 844
         } else {
845
-            $port = ':' . $port;
845
+            $port = ':'.$port;
846 846
         }
847 847
 
848
-        $op = 'POST ' . $uri . " HTTP/1.0\r\n" .
849
-            'User-Agent: ' . $this->user_agent . "\r\n" .
850
-            'Host: ' . $server . $port . "\r\n" .
851
-            $credentials .
852
-            $proxyCredentials .
853
-            $acceptedEncoding .
854
-            $encodingHdr .
855
-            'Accept-Charset: ' . implode(',', $this->accepted_charset_encodings) . "\r\n" .
856
-            $cookieHeader .
857
-            'Content-Type: ' . $req->content_type . "\r\nContent-Length: " .
858
-            strlen($payload) . "\r\n\r\n" .
848
+        $op = 'POST '.$uri." HTTP/1.0\r\n".
849
+            'User-Agent: '.$this->user_agent."\r\n".
850
+            'Host: '.$server.$port."\r\n".
851
+            $credentials.
852
+            $proxyCredentials.
853
+            $acceptedEncoding.
854
+            $encodingHdr.
855
+            'Accept-Charset: '.implode(',', $this->accepted_charset_encodings)."\r\n".
856
+            $cookieHeader.
857
+            'Content-Type: '.$req->content_type."\r\nContent-Length: ".
858
+            strlen($payload)."\r\n\r\n".
859 859
             $payload;
860 860
 
861
-        if ($this->debug > 1) {
861
+        if ($this->debug>1) {
862 862
             $this->getLogger()->debugMessage("---SENDING---\n$op\n---END---");
863 863
         }
864 864
 
@@ -885,7 +885,7 @@  discard block
 block discarded – undo
885 885
 
886 886
         $context = stream_context_create($contextOptions);
887 887
 
888
-        if ($timeout <= 0) {
888
+        if ($timeout<=0) {
889 889
             $connectTimeout = ini_get('default_socket_timeout');
890 890
         } else {
891 891
             $connectTimeout = $timeout;
@@ -897,7 +897,7 @@  discard block
 block discarded – undo
897 897
         $fp = @stream_socket_client("$transport://$connectServer:$connectPort", $this->errno, $this->errstr, $connectTimeout,
898 898
             STREAM_CLIENT_CONNECT, $context);
899 899
         if ($fp) {
900
-            if ($timeout > 0) {
900
+            if ($timeout>0) {
901 901
                 stream_set_timeout($fp, $timeout, 0);
902 902
             }
903 903
         } else {
@@ -906,8 +906,8 @@  discard block
 block discarded – undo
906 906
                 $this->errstr = $err['message'];
907 907
             }
908 908
 
909
-            $this->errstr = 'Connect error: ' . $this->errstr;
910
-            $r = new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['http_error'], $this->errstr . ' (' . $this->errno . ')');
909
+            $this->errstr = 'Connect error: '.$this->errstr;
910
+            $r = new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['http_error'], $this->errstr.' ('.$this->errno.')');
911 911
 
912 912
             return $r;
913 913
         }
@@ -995,18 +995,18 @@  discard block
 block discarded – undo
995 995
             $keyPass, $sslVersion);
996 996
 
997 997
         if (!$curl) {
998
-            return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['curl_fail'], PhpXmlRpc::$xmlrpcstr['curl_fail'] . ': error during curl initialization. Check php error log for details');
998
+            return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['curl_fail'], PhpXmlRpc::$xmlrpcstr['curl_fail'].': error during curl initialization. Check php error log for details');
999 999
         }
1000 1000
 
1001 1001
         $result = curl_exec($curl);
1002 1002
 
1003
-        if ($this->debug > 1) {
1003
+        if ($this->debug>1) {
1004 1004
             $message = "---CURL INFO---\n";
1005 1005
             foreach (curl_getinfo($curl) as $name => $val) {
1006 1006
                 if (is_array($val)) {
1007 1007
                     $val = implode("\n", $val);
1008 1008
                 }
1009
-                $message .= $name . ': ' . $val . "\n";
1009
+                $message .= $name.': '.$val."\n";
1010 1010
             }
1011 1011
             $message .= '---END---';
1012 1012
             $this->getLogger()->debugMessage($message);
@@ -1016,7 +1016,7 @@  discard block
 block discarded – undo
1016 1016
             /// @todo we should use a better check here - what if we get back '' or '0'?
1017 1017
 
1018 1018
             $this->errstr = 'no response';
1019
-            $resp = new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['curl_fail'], PhpXmlRpc::$xmlrpcstr['curl_fail'] . ': ' . curl_error($curl));
1019
+            $resp = new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['curl_fail'], PhpXmlRpc::$xmlrpcstr['curl_fail'].': '.curl_error($curl));
1020 1020
             curl_close($curl);
1021 1021
             if ($keepAlive) {
1022 1022
                 $this->xmlrpc_curl_handle = null;
@@ -1086,12 +1086,12 @@  discard block
 block discarded – undo
1086 1086
                     // http, https
1087 1087
                     $protocol = $method;
1088 1088
                     if (strpos($protocol, ':') !== false) {
1089
-                        $this->getLogger()->errorLog('XML-RPC: ' . __METHOD__ . ": warning - attempted hacking attempt?. The curl protocol requested for the call is: '$protocol'");
1089
+                        $this->getLogger()->errorLog('XML-RPC: '.__METHOD__.": warning - attempted hacking attempt?. The curl protocol requested for the call is: '$protocol'");
1090 1090
                         return false;
1091 1091
                     }
1092 1092
                 }
1093 1093
             }
1094
-            $curl = curl_init($protocol . '://' . $server . ':' . $port . $this->path);
1094
+            $curl = curl_init($protocol.'://'.$server.':'.$port.$this->path);
1095 1095
             if (!$curl) {
1096 1096
                 return false;
1097 1097
             }
@@ -1105,7 +1105,7 @@  discard block
 block discarded – undo
1105 1105
         // results into variable
1106 1106
         curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
1107 1107
 
1108
-        if ($this->debug > 1) {
1108
+        if ($this->debug>1) {
1109 1109
             curl_setopt($curl, CURLOPT_VERBOSE, true);
1110 1110
             /// @todo allow callers to redirect curlopt_stderr to some stream which can be buffered
1111 1111
         }
@@ -1130,7 +1130,7 @@  discard block
 block discarded – undo
1130 1130
             }
1131 1131
         }
1132 1132
         // extra headers
1133
-        $headers = array('Content-Type: ' . $req->content_type, 'Accept-Charset: ' . implode(',', $this->accepted_charset_encodings));
1133
+        $headers = array('Content-Type: '.$req->content_type, 'Accept-Charset: '.implode(',', $this->accepted_charset_encodings));
1134 1134
         // if no keepalive is wanted, let the server know it in advance
1135 1135
         if (!$keepAlive) {
1136 1136
             $headers[] = 'Connection: close';
@@ -1147,7 +1147,7 @@  discard block
 block discarded – undo
1147 1147
         curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
1148 1148
         // timeout is borked
1149 1149
         if ($timeout) {
1150
-            curl_setopt($curl, CURLOPT_TIMEOUT, $timeout == 1 ? 1 : $timeout - 1);
1150
+            curl_setopt($curl, CURLOPT_TIMEOUT, $timeout == 1 ? 1 : $timeout-1);
1151 1151
         }
1152 1152
 
1153 1153
         switch ($method) {
@@ -1162,7 +1162,7 @@  discard block
 block discarded – undo
1162 1162
                     curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE);
1163 1163
                 } else {
1164 1164
                     /// @todo make this a proper error, i.e. return a failure
1165
-                    $this->getLogger()->errorLog('XML-RPC: ' . __METHOD__ . ': warning. HTTP2 is not supported by the current PHP/curl install');
1165
+                    $this->getLogger()->errorLog('XML-RPC: '.__METHOD__.': warning. HTTP2 is not supported by the current PHP/curl install');
1166 1166
                 }
1167 1167
                 break;
1168 1168
             case 'h2':
@@ -1171,12 +1171,12 @@  discard block
 block discarded – undo
1171 1171
         }
1172 1172
 
1173 1173
         if ($username && $password) {
1174
-            curl_setopt($curl, CURLOPT_USERPWD, $username . ':' . $password);
1174
+            curl_setopt($curl, CURLOPT_USERPWD, $username.':'.$password);
1175 1175
             if (defined('CURLOPT_HTTPAUTH')) {
1176 1176
                 curl_setopt($curl, CURLOPT_HTTPAUTH, $authType);
1177 1177
             } elseif ($authType != 1) {
1178 1178
                 /// @todo make this a proper error, i.e. return a failure
1179
-                $this->getLogger()->errorLog('XML-RPC: ' . __METHOD__ . ': warning. Only Basic auth is supported by the current PHP/curl install');
1179
+                $this->getLogger()->errorLog('XML-RPC: '.__METHOD__.': warning. Only Basic auth is supported by the current PHP/curl install');
1180 1180
             }
1181 1181
         }
1182 1182
 
@@ -1219,14 +1219,14 @@  discard block
 block discarded – undo
1219 1219
             if ($proxyPort == 0) {
1220 1220
                 $proxyPort = 8080; // NB: even for HTTPS, local connection is on port 8080
1221 1221
             }
1222
-            curl_setopt($curl, CURLOPT_PROXY, $proxyHost . ':' . $proxyPort);
1222
+            curl_setopt($curl, CURLOPT_PROXY, $proxyHost.':'.$proxyPort);
1223 1223
             if ($proxyUsername) {
1224
-                curl_setopt($curl, CURLOPT_PROXYUSERPWD, $proxyUsername . ':' . $proxyPassword);
1224
+                curl_setopt($curl, CURLOPT_PROXYUSERPWD, $proxyUsername.':'.$proxyPassword);
1225 1225
                 if (defined('CURLOPT_PROXYAUTH')) {
1226 1226
                     curl_setopt($curl, CURLOPT_PROXYAUTH, $proxyAuthType);
1227 1227
                 } elseif ($proxyAuthType != 1) {
1228 1228
                     /// @todo make this a proper error, i.e. return a failure
1229
-                    $this->getLogger()->errorLog('XML-RPC: ' . __METHOD__ . ': warning. Only Basic auth to proxy is supported by the current PHP/curl install');
1229
+                    $this->getLogger()->errorLog('XML-RPC: '.__METHOD__.': warning. Only Basic auth to proxy is supported by the current PHP/curl install');
1230 1230
                 }
1231 1231
             }
1232 1232
         }
@@ -1236,7 +1236,7 @@  discard block
 block discarded – undo
1236 1236
         if (count($this->cookies)) {
1237 1237
             $cookieHeader = '';
1238 1238
             foreach ($this->cookies as $name => $cookie) {
1239
-                $cookieHeader .= $name . '=' . $cookie['value'] . '; ';
1239
+                $cookieHeader .= $name.'='.$cookie['value'].'; ';
1240 1240
             }
1241 1241
             curl_setopt($curl, CURLOPT_COOKIE, substr($cookieHeader, 0, -2));
1242 1242
         }
@@ -1245,7 +1245,7 @@  discard block
 block discarded – undo
1245 1245
             curl_setopt($curl, $opt, $val);
1246 1246
         }
1247 1247
 
1248
-        if ($this->debug > 1) {
1248
+        if ($this->debug>1) {
1249 1249
             $this->getLogger()->debugMessage("---SENDING---\n$payload\n---END---");
1250 1250
         }
1251 1251
 
@@ -1336,7 +1336,7 @@  discard block
 block discarded – undo
1336 1336
             $call['methodName'] = new Value($req->method(), 'string');
1337 1337
             $numParams = $req->getNumParams();
1338 1338
             $params = array();
1339
-            for ($i = 0; $i < $numParams; $i++) {
1339
+            for ($i = 0; $i<$numParams; $i++) {
1340 1340
                 $params[$i] = $req->getParam($i);
1341 1341
             }
1342 1342
             $call['params'] = new Value($params, 'array');
@@ -1358,7 +1358,7 @@  discard block
 block discarded – undo
1358 1358
         $response = array();
1359 1359
 
1360 1360
         if ($this->return_type == 'xml') {
1361
-            for ($i = 0; $i < count($reqs); $i++) {
1361
+            for ($i = 0; $i<count($reqs); $i++) {
1362 1362
                 $response[] = new Response($rets, 0, '', 'xml', $result->httpResponse());
1363 1363
             }
1364 1364
 
@@ -1366,21 +1366,21 @@  discard block
 block discarded – undo
1366 1366
             if (!is_array($rets)) {
1367 1367
                 // bad return type from system.multicall
1368 1368
                 return new Response(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1369
-                    PhpXmlRpc::$xmlrpcstr['multicall_error'] . ': not an array', 'phpvals', $result->httpResponse());
1369
+                    PhpXmlRpc::$xmlrpcstr['multicall_error'].': not an array', 'phpvals', $result->httpResponse());
1370 1370
             }
1371 1371
             $numRets = count($rets);
1372 1372
             if ($numRets != count($reqs)) {
1373 1373
                 // wrong number of return values.
1374 1374
                 return new Response(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1375
-                    PhpXmlRpc::$xmlrpcstr['multicall_error'] . ': incorrect number of responses', 'phpvals',
1375
+                    PhpXmlRpc::$xmlrpcstr['multicall_error'].': incorrect number of responses', 'phpvals',
1376 1376
                     $result->httpResponse());
1377 1377
             }
1378 1378
 
1379
-            for ($i = 0; $i < $numRets; $i++) {
1379
+            for ($i = 0; $i<$numRets; $i++) {
1380 1380
                 $val = $rets[$i];
1381 1381
                 if (!is_array($val)) {
1382 1382
                     return new Response(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1383
-                        PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i is not an array or struct",
1383
+                        PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i is not an array or struct",
1384 1384
                         'phpvals', $result->httpResponse());
1385 1385
                 }
1386 1386
                 switch (count($val)) {
@@ -1388,7 +1388,7 @@  discard block
 block discarded – undo
1388 1388
                         if (!isset($val[0])) {
1389 1389
                             // Bad value
1390 1390
                             return new Response(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1391
-                                PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has no value",
1391
+                                PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has no value",
1392 1392
                                 'phpvals', $result->httpResponse());
1393 1393
                         }
1394 1394
                         // Normal return value
@@ -1400,20 +1400,20 @@  discard block
 block discarded – undo
1400 1400
                         if (!is_int($code)) {
1401 1401
                             /// @todo should we check that it is != 0?
1402 1402
                             return new Response(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1403
-                                PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has invalid or no faultCode",
1403
+                                PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has invalid or no faultCode",
1404 1404
                                 'phpvals', $result->httpResponse());
1405 1405
                         }
1406 1406
                         $str = @$val['faultString'];
1407 1407
                         if (!is_string($str)) {
1408 1408
                             return new Response(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1409
-                                PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has invalid or no FaultString",
1409
+                                PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has invalid or no FaultString",
1410 1410
                                 'phpvals', $result->httpResponse());
1411 1411
                         }
1412 1412
                         $response[$i] = new Response(0, $code, $str, 'phpvals', $result->httpResponse());
1413 1413
                         break;
1414 1414
                     default:
1415 1415
                         return new Response(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1416
-                            PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has too many items",
1416
+                            PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has too many items",
1417 1417
                             'phpvals', $result->httpResponse());
1418 1418
                 }
1419 1419
             }
@@ -1422,14 +1422,14 @@  discard block
 block discarded – undo
1422 1422
             // return type == 'xmlrpcvals'
1423 1423
             if ($rets->kindOf() != 'array') {
1424 1424
                 return new Response(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1425
-                    PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i is not an array", 'xmlrpcvals',
1425
+                    PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i is not an array", 'xmlrpcvals',
1426 1426
                     $result->httpResponse());
1427 1427
             }
1428 1428
             $numRets = $rets->count();
1429 1429
             if ($numRets != count($reqs)) {
1430 1430
                 // wrong number of return values.
1431 1431
                 return new Response(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1432
-                    PhpXmlRpc::$xmlrpcstr['multicall_error'] . ': incorrect number of responses', 'xmlrpcvals',
1432
+                    PhpXmlRpc::$xmlrpcstr['multicall_error'].': incorrect number of responses', 'xmlrpcvals',
1433 1433
                     $result->httpResponse());
1434 1434
             }
1435 1435
 
@@ -1438,7 +1438,7 @@  discard block
 block discarded – undo
1438 1438
                     case 'array':
1439 1439
                         if ($val->count() != 1) {
1440 1440
                             return new Response(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1441
-                                PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has too many items",
1441
+                                PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has too many items",
1442 1442
                                 'phpvals', $result->httpResponse());
1443 1443
                         }
1444 1444
                         // Normal return value
@@ -1447,28 +1447,28 @@  discard block
 block discarded – undo
1447 1447
                     case 'struct':
1448 1448
                         if ($val->count() != 2) {
1449 1449
                             return new Response(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1450
-                                PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has too many items",
1450
+                                PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has too many items",
1451 1451
                                 'phpvals', $result->httpResponse());
1452 1452
                         }
1453 1453
                         /** @var Value $code */
1454 1454
                         $code = $val['faultCode'];
1455 1455
                         if ($code->kindOf() != 'scalar' || $code->scalartyp() != 'int') {
1456 1456
                             return new Response(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1457
-                                PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has invalid or no faultCode",
1457
+                                PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has invalid or no faultCode",
1458 1458
                                 'xmlrpcvals', $result->httpResponse());
1459 1459
                         }
1460 1460
                         /** @var Value $str */
1461 1461
                         $str = $val['faultString'];
1462 1462
                         if ($str->kindOf() != 'scalar' || $str->scalartyp() != 'string') {
1463 1463
                             return new Response(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1464
-                                PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has invalid or no faultCode",
1464
+                                PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has invalid or no faultCode",
1465 1465
                                 'xmlrpcvals', $result->httpResponse());
1466 1466
                         }
1467 1467
                         $response[] = new Response(0, $code->scalarval(), $str->scalarval(), 'xmlrpcvals', $result->httpResponse());
1468 1468
                         break;
1469 1469
                     default:
1470 1470
                         return new Response(0, PhpXmlRpc::$xmlrpcerr['multicall_error'],
1471
-                            PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i is not an array or struct",
1471
+                            PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i is not an array or struct",
1472 1472
                             'xmlrpcvals', $result->httpResponse());
1473 1473
                 }
1474 1474
             }
Please login to merge, or discard this patch.