Passed
Push — master ( 0c11b8...7877a8 )
by Gaetano
09:59
created
demo/client/mail.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require_once __DIR__ . "/_prepend.php";
2
+require_once __DIR__."/_prepend.php";
3 3
 
4 4
 output('<html lang="en">
5 5
 <head><title>xmlrpc - Mail demo</title></head>
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
         output("<font color=\"red\">");
36 36
         output("Mail send failed<br/>\n");
37 37
         output("Fault: ");
38
-        output("Code: " . htmlspecialchars($resp->faultCode()) .
39
-            " Reason: '" . htmlspecialchars($resp->faultString()) . "'<br/>");
38
+        output("Code: ".htmlspecialchars($resp->faultCode()).
39
+            " Reason: '".htmlspecialchars($resp->faultString())."'<br/>");
40 40
         output("</font><br/>");
41 41
     }
42 42
 }
@@ -57,4 +57,4 @@  discard block
 block discarded – undo
57 57
 </html>
58 58
 ');
59 59
 
60
-require_once __DIR__ . "/_append.php";
60
+require_once __DIR__."/_append.php";
Please login to merge, or discard this patch.
extras/benchmark.php 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@  discard block
 block discarded – undo
19 19
 use PhpXmlRpc\Encoder;
20 20
 
21 21
 /// @todo allow autoloading when the library is installed as dependency
22
-include_once __DIR__ . '/../vendor/autoload.php';
22
+include_once __DIR__.'/../vendor/autoload.php';
23 23
 
24
-include __DIR__ . '/../tests/parse_args.php';
24
+include __DIR__.'/../tests/parse_args.php';
25 25
 $args = argParser::getArgs();
26 26
 
27 27
 function begin_test($test_name, $test_case)
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     if (!isset($test_results[$test_name][$test_case])) {
42 42
         trigger_error('ending test that was not started');
43 43
     }
44
-    $test_results[$test_name][$test_case]['time'] = $end - $test_results[$test_name][$test_case]['time'];
44
+    $test_results[$test_name][$test_case]['time'] = $end-$test_results[$test_name][$test_case]['time'];
45 45
     $test_results[$test_name][$test_case]['result'] = $test_result;
46 46
     echo '.';
47 47
     flush();
@@ -75,24 +75,24 @@  discard block
 block discarded – undo
75 75
 }
76 76
 
77 77
 if ($is_web) {
78
-    echo "<h3>Using lib version: " . PhpXmlRpc::$xmlrpcVersion . " on PHP version: " . phpversion() . "</h3>\n";
78
+    echo "<h3>Using lib version: ".PhpXmlRpc::$xmlrpcVersion." on PHP version: ".phpversion()."</h3>\n";
79 79
     if ($xd) {
80
-        echo "<h4>XDEBUG profiling enabled: skipping remote tests. Trace file is: " . htmlspecialchars(xdebug_get_profiler_filename()) . "</h4>\n";
80
+        echo "<h4>XDEBUG profiling enabled: skipping remote tests. Trace file is: ".htmlspecialchars(xdebug_get_profiler_filename())."</h4>\n";
81 81
     }
82 82
     flush();
83 83
     ob_flush();
84 84
 } else {
85
-    echo "Using lib version: " . PhpXmlRpc::$xmlrpcVersion . " on PHP version: " . phpversion() . "\n";
85
+    echo "Using lib version: ".PhpXmlRpc::$xmlrpcVersion." on PHP version: ".phpversion()."\n";
86 86
     if ($xd) {
87
-        echo "XDEBUG profiling enabled: skipping remote tests\nTrace file is: " . xdebug_get_profiler_filename() . "\n";
87
+        echo "XDEBUG profiling enabled: skipping remote tests\nTrace file is: ".xdebug_get_profiler_filename()."\n";
88 88
     }
89 89
 }
90 90
 
91 91
 // test 'manual style' data encoding vs. 'automatic style' encoding
92 92
 begin_test('Data encoding (large array)', 'manual encoding');
93
-for ($i = 0; $i < $num_tests; $i++) {
93
+for ($i = 0; $i<$num_tests; $i++) {
94 94
     $vals = array();
95
-    for ($j = 0; $j < 10; $j++) {
95
+    for ($j = 0; $j<10; $j++) {
96 96
         $valarray = array();
97 97
         foreach ($data[$j] as $key => $val) {
98 98
             $values = array();
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
 begin_test('Data encoding (large array)', 'automatic encoding');
119 119
 $encoder = new Encoder();
120
-for ($i = 0; $i < $num_tests; $i++) {
120
+for ($i = 0; $i<$num_tests; $i++) {
121 121
     $value = $encoder->encode($data, array('auto_dates'));
122 122
     $out = $value->serialize();
123 123
 }
@@ -125,8 +125,8 @@  discard block
 block discarded – undo
125 125
 
126 126
 if (function_exists('xmlrpc_set_type')) {
127 127
     begin_test('Data encoding (large array)', 'xmlrpc-epi encoding');
128
-    for ($i = 0; $i < $num_tests; $i++) {
129
-        for ($j = 0; $j < 10; $j++) {
128
+    for ($i = 0; $i<$num_tests; $i++) {
129
+        for ($j = 0; $j<10; $j++) {
130 130
             foreach ($keys as $k) {
131 131
                 xmlrpc_set_type($data[$j][$k][4], 'datetime');
132 132
                 xmlrpc_set_type($data[$j][$k][8], 'datetime');
@@ -140,18 +140,18 @@  discard block
 block discarded – undo
140 140
 // test 'old style' data decoding vs. 'automatic style' decoding
141 141
 $dummy = new Request('');
142 142
 $out = new Response($value);
143
-$in = '<?xml version="1.0" ?>' . "\n" . $out->serialize();
143
+$in = '<?xml version="1.0" ?>'."\n".$out->serialize();
144 144
 
145 145
 begin_test('Data decoding (large array)', 'manual decoding');
146
-for ($i = 0; $i < $num_tests; $i++) {
146
+for ($i = 0; $i<$num_tests; $i++) {
147 147
     $response = $dummy->ParseResponse($in, true);
148 148
     $value = $response->value();
149 149
     $result = array();
150
-    foreach($value as $val1) {
150
+    foreach ($value as $val1) {
151 151
         $out = array();
152
-        foreach($val1 as $name => $val) {
152
+        foreach ($val1 as $name => $val) {
153 153
             $out[$name] = array();
154
-            foreach($val as $data) {
154
+            foreach ($val as $data) {
155 155
                 $out[$name][] = $data->scalarval();
156 156
             }
157 157
         }
@@ -161,18 +161,18 @@  discard block
 block discarded – undo
161 161
 end_test('Data decoding (large array)', 'manual decoding', $result);
162 162
 
163 163
 begin_test('Data decoding (large array)', 'manual decoding deprecated');
164
-for ($i = 0; $i < $num_tests; $i++) {
164
+for ($i = 0; $i<$num_tests; $i++) {
165 165
     $response = $dummy->ParseResponse($in, true);
166 166
     $value = $response->value();
167 167
     $result = array();
168 168
     $l = $value->arraysize();
169
-    for ($k = 0; $k < $l; $k++) {
169
+    for ($k = 0; $k<$l; $k++) {
170 170
         $val1 = $value->arraymem($k);
171 171
         $out = array();
172
-        foreach($val1 as $name => $val) {
172
+        foreach ($val1 as $name => $val) {
173 173
             $out[$name] = array();
174 174
             $m = $val->arraysize();
175
-            for ($j = 0; $j < $m; $j++) {
175
+            for ($j = 0; $j<$m; $j++) {
176 176
                 $data = $val->arraymem($j);
177 177
                 $out[$name][] = $data->scalarval();
178 178
             }
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 end_test('Data decoding (large array)', 'manual decoding deprecated', $result);
184 184
 
185 185
 begin_test('Data decoding (large array)', 'automatic decoding');
186
-for ($i = 0; $i < $num_tests; $i++) {
186
+for ($i = 0; $i<$num_tests; $i++) {
187 187
     $response = $dummy->ParseResponse($in, true, 'phpvals');
188 188
     $value = $response->value();
189 189
 }
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 
192 192
 if (function_exists('xmlrpc_decode')) {
193 193
     begin_test('Data decoding (large array)', 'xmlrpc-epi decoding');
194
-    for ($i = 0; $i < $num_tests; $i++) {
194
+    for ($i = 0; $i<$num_tests; $i++) {
195 195
         $response = $dummy->ParseResponse($in, true, 'xml');
196 196
         $value = xmlrpc_decode($response->value());
197 197
     }
@@ -208,16 +208,16 @@  discard block
 block discarded – undo
208 208
     $value = $encoder->encode($data1, array('auto_dates'));
209 209
     $req = new Request('interopEchoTests.echoValue', array($value));
210 210
     $reqs = array();
211
-    for ($i = 0; $i < $num_tests; $i++) {
211
+    for ($i = 0; $i<$num_tests; $i++) {
212 212
         $reqs[] = $req;
213 213
     }
214 214
 
215 215
     $server = explode(':', $args['HTTPSERVER']);
216
-    if (count($server) > 1) {
217
-        $srv = 'http://' . $server[0] . '://' . $server[1] . $args['HTTPURI'];
216
+    if (count($server)>1) {
217
+        $srv = 'http://'.$server[0].'://'.$server[1].$args['HTTPURI'];
218 218
         $c = new Client($args['HTTPURI'], $server[0], $server[1]);
219 219
     } else {
220
-        $srv = 'http://' . $args['HTTPSERVER'] . $args['HTTPURI'];
220
+        $srv = 'http://'.$args['HTTPSERVER'].$args['HTTPURI'];
221 221
         $c = new Client($args['HTTPURI'], $args['HTTPSERVER']);
222 222
     }
223 223
 
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 
230 230
     begin_test($testName, 'http 10');
231 231
     $response = array();
232
-    for ($i = 0; $i < $num_tests; $i++) {
232
+    for ($i = 0; $i<$num_tests; $i++) {
233 233
         $resp = $c->send($req);
234 234
         $response[] = $resp->value();
235 235
     }
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
         $c->keepalive = false;
240 240
         begin_test($testName, 'http 11 no keepalive');
241 241
         $response = array();
242
-        for ($i = 0; $i < $num_tests; $i++) {
242
+        for ($i = 0; $i<$num_tests; $i++) {
243 243
             $resp = $c->send($req, 10, 'http11');
244 244
             $response[] = $resp->value();
245 245
         }
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 
248 248
         begin_test($testName, 'http 11 w. keep-alive');
249 249
         $response = array();
250
-        for ($i = 0; $i < $num_tests; $i++) {
250
+        for ($i = 0; $i<$num_tests; $i++) {
251 251
             $resp = $c->send($req, 10, 'http11');
252 252
             $response[] = $resp->value();
253 253
         }
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 
270 270
         begin_test($testName, 'http 10 w. compression');
271 271
         $response = array();
272
-        for ($i = 0; $i < $num_tests; $i++) {
272
+        for ($i = 0; $i<$num_tests; $i++) {
273 273
             $resp = $c->send($req);
274 274
             $response[] = $resp->value();
275 275
         }
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
             $c->keepalive = false;
280 280
             begin_test($testName, 'http 11 w. compression and no keepalive');
281 281
             $response = array();
282
-            for ($i = 0; $i < $num_tests; $i++) {
282
+            for ($i = 0; $i<$num_tests; $i++) {
283 283
                 $resp = $c->send($req, 10, 'http11');
284 284
                 $response[] = $resp->value();
285 285
             }
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
             $c->keepalive = true;
289 289
             begin_test($testName, 'http 11 w. keep-alive and compression');
290 290
             $response = array();
291
-            for ($i = 0; $i < $num_tests; $i++) {
291
+            for ($i = 0; $i<$num_tests; $i++) {
292 292
                 $resp = $c->send($req, 10, 'http11');
293 293
                 $response[] = $resp->value();
294 294
             }
@@ -309,11 +309,11 @@  discard block
 block discarded – undo
309 309
         /// test multicall vs. many calls vs. keep-alives - HTTPS
310 310
 
311 311
         $server = explode(':', $args['HTTPSSERVER']);
312
-        if (count($server) > 1) {
313
-            $srv = 'https://' . $server[0] . ':' . $server[1] . $args['HTTPSURI'];
312
+        if (count($server)>1) {
313
+            $srv = 'https://'.$server[0].':'.$server[1].$args['HTTPSURI'];
314 314
             $c = new Client($args['HTTPSURI'], $server[0], $server[1], 'https');
315 315
         } else {
316
-            $srv = 'https://' . $args['HTTPSSERVER'] . $args['HTTPSURI'];
316
+            $srv = 'https://'.$args['HTTPSSERVER'].$args['HTTPSURI'];
317 317
             $c = new Client($args['HTTPSURI'], $args['HTTPSSERVER'], 443, 'https');
318 318
         }
319 319
         $c->setSSLVerifyPeer(!$args['HTTPSIGNOREPEER']);
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
         begin_test($testName, 'https no keep-alive');
328 328
         $c->keepalive = false;
329 329
         $response = array();
330
-        for ($i = 0; $i < $num_tests; $i++) {
330
+        for ($i = 0; $i<$num_tests; $i++) {
331 331
             $resp = $c->send($req);
332 332
             $response[] = $resp->value();
333 333
         }
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
         begin_test($testName, 'https w. keep-alive');
337 337
         $c->keepalive = true;
338 338
         $response = array();
339
-        for ($i = 0; $i < $num_tests; $i++) {
339
+        for ($i = 0; $i<$num_tests; $i++) {
340 340
             $resp = $c->send($req, 10);
341 341
             $response[] = $resp->value();
342 342
         }
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
             $c->keepalive = false;
358 358
             begin_test($testName, 'https w. compression and no keepalive');
359 359
             $response = array();
360
-            for ($i = 0; $i < $num_tests; $i++) {
360
+            for ($i = 0; $i<$num_tests; $i++) {
361 361
                 $resp = $c->send($req);
362 362
                 $response[] = $resp->value();
363 363
             }
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
             $c->keepalive = true;
367 367
             begin_test($testName, 'https w. keep-alive and compression');
368 368
             $response = array();
369
-            for ($i = 0; $i < $num_tests; $i++) {
369
+            for ($i = 0; $i<$num_tests; $i++) {
370 370
                 $resp = $c->send($req, 10);
371 371
                 $response[] = $resp->value();
372 372
             }
@@ -387,11 +387,11 @@  discard block
 block discarded – undo
387 387
         /// test multicall vs. many calls vs. keep-alives - HTTP/2
388 388
 
389 389
         $server = explode(':', $args['HTTPSSERVER']);
390
-        if (count($server) > 1) {
391
-            $srv = 'https://' . $server[0] . ':' . $server[1] . $args['HTTPSURI'];
390
+        if (count($server)>1) {
391
+            $srv = 'https://'.$server[0].':'.$server[1].$args['HTTPSURI'];
392 392
             $c = new Client($args['HTTPSURI'], $server[0], $server[1], 'https');
393 393
         } else {
394
-            $srv = 'https://' . $args['HTTPSSERVER'] . $args['HTTPSURI'];
394
+            $srv = 'https://'.$args['HTTPSSERVER'].$args['HTTPSURI'];
395 395
             $c = new Client($args['HTTPSURI'], $args['HTTPSSERVER'], 443, 'h2');
396 396
         }
397 397
         $c->setSSLVerifyPeer(!$args['HTTPSIGNOREPEER']);
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
         begin_test($testName, 'http2 no keep-alive');
406 406
         $c->keepalive = false;
407 407
         $response = array();
408
-        for ($i = 0; $i < $num_tests; $i++) {
408
+        for ($i = 0; $i<$num_tests; $i++) {
409 409
             $resp = $c->send($req);
410 410
             $response[] = $resp->value();
411 411
         }
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
         begin_test($testName, 'http2 w. keep-alive');
415 415
         $c->keepalive = true;
416 416
         $response = array();
417
-        for ($i = 0; $i < $num_tests; $i++) {
417
+        for ($i = 0; $i<$num_tests; $i++) {
418 418
             $resp = $c->send($req, 10);
419 419
             $response[] = $resp->value();
420 420
         }
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
             $c->keepalive = false;
436 436
             begin_test($testName, 'http2 w. compression and no keepalive');
437 437
             $response = array();
438
-            for ($i = 0; $i < $num_tests; $i++) {
438
+            for ($i = 0; $i<$num_tests; $i++) {
439 439
                 $resp = $c->send($req);
440 440
                 $response[] = $resp->value();
441 441
             }
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
             $c->keepalive = true;
445 445
             begin_test($testName, 'http2 w. keep-alive and compression');
446 446
             $response = array();
447
-            for ($i = 0; $i < $num_tests; $i++) {
447
+            for ($i = 0; $i<$num_tests; $i++) {
448 448
                 $resp = $c->send($req, 10);
449 449
                 $response[] = $resp->value();
450 450
             }
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
 foreach ($test_results as $test => $results) {
467 467
     echo "\nTEST: $test\n";
468 468
     foreach ($results as $case => $data) {
469
-        echo "  $case: {$data['time']} secs - Output data CRC: " . crc32(serialize($data['result'])) . "\n";
469
+        echo "  $case: {$data['time']} secs - Output data CRC: ".crc32(serialize($data['result']))."\n";
470 470
     }
471 471
 }
472 472
 
Please login to merge, or discard this patch.
debugger/action.php 1 patch
Spacing   +113 added lines, -113 removed lines patch added patch discarded remove patch
@@ -92,13 +92,13 @@  discard block
 block discarded – undo
92 92
 <body>
93 93
 <?php
94 94
 
95
-include __DIR__ . '/common.php';
95
+include __DIR__.'/common.php';
96 96
 
97 97
 if ($action) {
98 98
 
99 99
     // make sure the script waits long enough for the call to complete...
100 100
     if ($timeout) {
101
-        set_time_limit($timeout + 10);
101
+        set_time_limit($timeout+10);
102 102
     }
103 103
 
104 104
     if ($wstype == 1) {
@@ -123,13 +123,13 @@  discard block
 block discarded – undo
123 123
         $server = "$host$path";
124 124
     }
125 125
     if ($protocol == 2) {
126
-        $server = 'https://' . $server;
126
+        $server = 'https://'.$server;
127 127
     } else {
128
-        $server = 'http://' . $server;
128
+        $server = 'http://'.$server;
129 129
     }
130 130
     if ($proxy != '') {
131 131
         $pproxy = explode(':', $proxy);
132
-        if (count($pproxy) > 1) {
132
+        if (count($pproxy)>1) {
133 133
             $pport = $pproxy[1];
134 134
         } else {
135 135
             $pport = 8080;
@@ -198,9 +198,9 @@  discard block
 block discarded – undo
198 198
         case 'wrap':
199 199
             $msg[0] = new $requestClass('system.methodHelp', array(), $id);
200 200
             $msg[0]->addparam(new PhpXmlRpc\Value($method));
201
-            $msg[1] = new $requestClass('system.methodSignature', array(), (int)$id + 1);
201
+            $msg[1] = new $requestClass('system.methodSignature', array(), (int) $id+1);
202 202
             $msg[1]->addparam(new PhpXmlRpc\Value($method));
203
-            $actionname = 'Description of method "' . $method . '"';
203
+            $actionname = 'Description of method "'.$method.'"';
204 204
             break;
205 205
         case 'list':
206 206
             $msg[0] = new $requestClass('system.listMethods', array(), $id);
@@ -213,9 +213,9 @@  discard block
 block discarded – undo
213 213
             $msg[0] = new $requestClass($method, array(), $id);
214 214
             // hack! build xml payload by hand
215 215
             if ($wstype == 1) {
216
-                $msg[0]->payload = "{\n" .
217
-                    '"method": "' . $method . "\",\n\"params\": [" .
218
-                    $payload .
216
+                $msg[0]->payload = "{\n".
217
+                    '"method": "'.$method."\",\n\"params\": [".
218
+                    $payload.
219 219
                     "\n],\n\"id\": ";
220 220
                 // fix: if user gave an empty string, use NULL, or we'll break json syntax
221 221
                 if ($id == "") {
@@ -228,20 +228,20 @@  discard block
 block discarded – undo
228 228
                     }
229 229
                 }
230 230
             } else {
231
-                $msg[0]->payload = $msg[0]->xml_header($inputcharset) .
232
-                    '<methodName>' . $method . "</methodName>\n<params>" .
233
-                    $payload .
234
-                    "</params>\n" . $msg[0]->xml_footer();
231
+                $msg[0]->payload = $msg[0]->xml_header($inputcharset).
232
+                    '<methodName>'.$method."</methodName>\n<params>".
233
+                    $payload.
234
+                    "</params>\n".$msg[0]->xml_footer();
235 235
             }
236
-            $actionname = 'Execution of method ' . $method;
236
+            $actionname = 'Execution of method '.$method;
237 237
             break;
238 238
         default: // give a warning
239
-            $actionname = '[ERROR: unknown action] "' . $action . '"';
239
+            $actionname = '[ERROR: unknown action] "'.$action.'"';
240 240
     }
241 241
 
242 242
     // Before calling execute, echo out brief description of action taken + date and time ???
243 243
     // this gives good user feedback for long-running methods...
244
-    echo '<h2>' . htmlspecialchars($actionname, ENT_COMPAT, $inputcharset) . ' on server ' . htmlspecialchars($server, ENT_COMPAT, $inputcharset) . " ...</h2>\n";
244
+    echo '<h2>'.htmlspecialchars($actionname, ENT_COMPAT, $inputcharset).' on server '.htmlspecialchars($server, ENT_COMPAT, $inputcharset)." ...</h2>\n";
245 245
     flush();
246 246
 
247 247
     $response = null;
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
             break;
260 260
         }
261 261
     }
262
-    $time = microtime(true) - $time;
262
+    $time = microtime(true)-$time;
263 263
     if ($debug) {
264 264
         echo "</div>\n";
265 265
     }
@@ -269,8 +269,8 @@  discard block
 block discarded – undo
269 269
             // call failed! echo out error msg!
270 270
             //echo '<h2>'.htmlspecialchars($actionname, ENT_COMPAT, $inputcharset).' on server '.htmlspecialchars($server, ENT_COMPAT, $inputcharset).'</h2>';
271 271
             echo "<h3>$protoName call FAILED!</h3>\n";
272
-            echo "<p>Fault code: [" . htmlspecialchars($response->faultCode(), ENT_COMPAT, \PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding) .
273
-                "] Reason: '" . htmlspecialchars($response->faultString(), ENT_COMPAT, \PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding) . "'</p>\n";
272
+            echo "<p>Fault code: [".htmlspecialchars($response->faultCode(), ENT_COMPAT, \PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding).
273
+                "] Reason: '".htmlspecialchars($response->faultString(), ENT_COMPAT, \PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding)."'</p>\n";
274 274
             echo(date("d/M/Y:H:i:s\n"));
275 275
         } else {
276 276
             // call succeeded: parse results
@@ -286,36 +286,36 @@  discard block
 block discarded – undo
286 286
                         $max = $v->count();
287 287
                         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
288 288
                         echo "<thead>\n<tr><th>Method ($max)</th><th>Description</th></tr>\n</thead>\n<tbody>\n";
289
-                        foreach($v as $i => $rec) {
289
+                        foreach ($v as $i => $rec) {
290 290
                             if ($i % 2) {
291 291
                                 $class = ' class="oddrow"';
292 292
                             } else {
293 293
                                 $class = ' class="evenrow"';
294 294
                             }
295
-                            echo("<tr><td$class>" . htmlspecialchars($rec->scalarval(), ENT_COMPAT, \PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding) . "</td><td$class><form action=\"controller.php\" method=\"get\" target=\"frmcontroller\">" .
296
-                                "<input type=\"hidden\" name=\"host\" value=\"" . htmlspecialchars($host, ENT_COMPAT, $inputcharset) . "\" />" .
297
-                                "<input type=\"hidden\" name=\"port\" value=\"" . htmlspecialchars($port, ENT_COMPAT, $inputcharset) . "\" />" .
298
-                                "<input type=\"hidden\" name=\"path\" value=\"" . htmlspecialchars($path, ENT_COMPAT, $inputcharset) . "\" />" .
299
-                                "<input type=\"hidden\" name=\"id\" value=\"" . htmlspecialchars($id, ENT_COMPAT, $inputcharset) . "\" />" .
300
-                                "<input type=\"hidden\" name=\"debug\" value=\"$debug\" />" .
301
-                                "<input type=\"hidden\" name=\"username\" value=\"" . htmlspecialchars($username, ENT_COMPAT, $inputcharset) . "\" />" .
302
-                                "<input type=\"hidden\" name=\"password\" value=\"" . htmlspecialchars($password, ENT_COMPAT, $inputcharset) . "\" />" .
303
-                                "<input type=\"hidden\" name=\"authtype\" value=\"$authtype\" />" .
304
-                                "<input type=\"hidden\" name=\"verifyhost\" value=\"$verifyhost\" />" .
305
-                                "<input type=\"hidden\" name=\"verifypeer\" value=\"$verifypeer\" />" .
306
-                                "<input type=\"hidden\" name=\"cainfo\" value=\"" . htmlspecialchars($cainfo, ENT_COMPAT, $inputcharset) . "\" />" .
307
-                                "<input type=\"hidden\" name=\"proxy\" value=\"" . htmlspecialchars($proxy, ENT_COMPAT, $inputcharset) . "\" />" .
308
-                                "<input type=\"hidden\" name=\"proxyuser\" value=\"" . htmlspecialchars($proxyuser, ENT_COMPAT, $inputcharset) . "\" />" .
309
-                                "<input type=\"hidden\" name=\"proxypwd\" value=\"" . htmlspecialchars($proxypwd, ENT_COMPAT, $inputcharset) . "\" />" .
310
-                                "<input type=\"hidden\" name=\"responsecompression\" value=\"$responsecompression\" />" .
311
-                                "<input type=\"hidden\" name=\"requestcompression\" value=\"$requestcompression\" />" .
312
-                                "<input type=\"hidden\" name=\"clientcookies\" value=\"" . htmlspecialchars($clientcookies, ENT_COMPAT, $inputcharset) . "\" />" .
313
-                                "<input type=\"hidden\" name=\"protocol\" value=\"$protocol\" />" .
314
-                                "<input type=\"hidden\" name=\"timeout\" value=\"" . htmlspecialchars($timeout, ENT_COMPAT, $inputcharset) . "\" />" .
315
-                                "<input type=\"hidden\" name=\"method\" value=\"" . htmlspecialchars($rec->scalarval(), ENT_COMPAT, \PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding) . "\" />" .
316
-                                "<input type=\"hidden\" name=\"wstype\" value=\"$wstype\" />" .
317
-                                "<input type=\"hidden\" name=\"action\" value=\"describe\" />" .
318
-                                "<input type=\"hidden\" name=\"run\" value=\"now\" />" .
295
+                            echo("<tr><td$class>".htmlspecialchars($rec->scalarval(), ENT_COMPAT, \PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding)."</td><td$class><form action=\"controller.php\" method=\"get\" target=\"frmcontroller\">".
296
+                                "<input type=\"hidden\" name=\"host\" value=\"".htmlspecialchars($host, ENT_COMPAT, $inputcharset)."\" />".
297
+                                "<input type=\"hidden\" name=\"port\" value=\"".htmlspecialchars($port, ENT_COMPAT, $inputcharset)."\" />".
298
+                                "<input type=\"hidden\" name=\"path\" value=\"".htmlspecialchars($path, ENT_COMPAT, $inputcharset)."\" />".
299
+                                "<input type=\"hidden\" name=\"id\" value=\"".htmlspecialchars($id, ENT_COMPAT, $inputcharset)."\" />".
300
+                                "<input type=\"hidden\" name=\"debug\" value=\"$debug\" />".
301
+                                "<input type=\"hidden\" name=\"username\" value=\"".htmlspecialchars($username, ENT_COMPAT, $inputcharset)."\" />".
302
+                                "<input type=\"hidden\" name=\"password\" value=\"".htmlspecialchars($password, ENT_COMPAT, $inputcharset)."\" />".
303
+                                "<input type=\"hidden\" name=\"authtype\" value=\"$authtype\" />".
304
+                                "<input type=\"hidden\" name=\"verifyhost\" value=\"$verifyhost\" />".
305
+                                "<input type=\"hidden\" name=\"verifypeer\" value=\"$verifypeer\" />".
306
+                                "<input type=\"hidden\" name=\"cainfo\" value=\"".htmlspecialchars($cainfo, ENT_COMPAT, $inputcharset)."\" />".
307
+                                "<input type=\"hidden\" name=\"proxy\" value=\"".htmlspecialchars($proxy, ENT_COMPAT, $inputcharset)."\" />".
308
+                                "<input type=\"hidden\" name=\"proxyuser\" value=\"".htmlspecialchars($proxyuser, ENT_COMPAT, $inputcharset)."\" />".
309
+                                "<input type=\"hidden\" name=\"proxypwd\" value=\"".htmlspecialchars($proxypwd, ENT_COMPAT, $inputcharset)."\" />".
310
+                                "<input type=\"hidden\" name=\"responsecompression\" value=\"$responsecompression\" />".
311
+                                "<input type=\"hidden\" name=\"requestcompression\" value=\"$requestcompression\" />".
312
+                                "<input type=\"hidden\" name=\"clientcookies\" value=\"".htmlspecialchars($clientcookies, ENT_COMPAT, $inputcharset)."\" />".
313
+                                "<input type=\"hidden\" name=\"protocol\" value=\"$protocol\" />".
314
+                                "<input type=\"hidden\" name=\"timeout\" value=\"".htmlspecialchars($timeout, ENT_COMPAT, $inputcharset)."\" />".
315
+                                "<input type=\"hidden\" name=\"method\" value=\"".htmlspecialchars($rec->scalarval(), ENT_COMPAT, \PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding)."\" />".
316
+                                "<input type=\"hidden\" name=\"wstype\" value=\"$wstype\" />".
317
+                                "<input type=\"hidden\" name=\"action\" value=\"describe\" />".
318
+                                "<input type=\"hidden\" name=\"run\" value=\"now\" />".
319 319
                                 "<input type=\"submit\" value=\"Describe\" /></form></td>");
320 320
                             //echo("</tr>\n");
321 321
 
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
                     $r2 = $resp[1]->value();
343 343
 
344 344
                     echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
345
-                    echo "<thead>\n<tr><th>Method</th><th>" . htmlspecialchars($method, ENT_COMPAT, $inputcharset) . "</th><th>&nbsp;</th><th>&nbsp;</th></tr>\n</thead>\n<tbody>\n";
345
+                    echo "<thead>\n<tr><th>Method</th><th>".htmlspecialchars($method, ENT_COMPAT, $inputcharset)."</th><th>&nbsp;</th><th>&nbsp;</th></tr>\n</thead>\n<tbody>\n";
346 346
                     $desc = htmlspecialchars($r1->scalarval(), ENT_COMPAT, \PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding);
347 347
                     if ($desc == "") {
348 348
                         $desc = "-";
@@ -352,41 +352,41 @@  discard block
 block discarded – undo
352 352
                     if ($r2->kindOf() != "array") {
353 353
                         echo "<tr><td class=\"oddrow\">Signature</td><td class=\"oddrow\">Unknown</td><td class=\"oddrow\">&nbsp;</td></tr>\n";
354 354
                     } else {
355
-                        foreach($r2 as $i => $x) {
355
+                        foreach ($r2 as $i => $x) {
356 356
                             $payload = "";
357 357
                             $alt_payload = "";
358
-                            if ($i + 1 % 2) {
358
+                            if ($i+1 % 2) {
359 359
                                 $class = ' class="oddrow"';
360 360
                             } else {
361 361
                                 $class = ' class="evenrow"';
362 362
                             }
363
-                            echo "<tr><td$class>Signature&nbsp;" . ($i + 1) . "</td><td$class>";
363
+                            echo "<tr><td$class>Signature&nbsp;".($i+1)."</td><td$class>";
364 364
                             if ($x->kindOf() == "array") {
365 365
                                 $ret = $x[0];
366
-                                echo "<code>OUT:&nbsp;" . htmlspecialchars($ret->scalarval(), ENT_COMPAT, \PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding) . "<br />IN: (";
367
-                                if ($x->count() > 1) {
368
-                                    foreach($x as $k => $y) {
366
+                                echo "<code>OUT:&nbsp;".htmlspecialchars($ret->scalarval(), ENT_COMPAT, \PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding)."<br />IN: (";
367
+                                if ($x->count()>1) {
368
+                                    foreach ($x as $k => $y) {
369 369
                                         if ($k == 0) continue;
370 370
                                         echo htmlspecialchars($y->scalarval(), ENT_COMPAT, \PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding);
371 371
                                         if ($wstype != 1) {
372 372
                                             $type = $y->scalarval();
373 373
                                             $payload .= '<param><value>';
374
-                                            switch($type) {
374
+                                            switch ($type) {
375 375
                                                 case 'undefined':
376 376
                                                     break;
377 377
                                                 case 'null';
378 378
                                                     $type = 'nil';
379 379
                                                     // fall thru intentionally
380 380
                                                 default:
381
-                                                    $payload .= '<' .
382
-                                                        htmlspecialchars($type, ENT_COMPAT, \PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding) .
383
-                                                        '></' . htmlspecialchars($type, ENT_COMPAT, \PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding) .
381
+                                                    $payload .= '<'.
382
+                                                        htmlspecialchars($type, ENT_COMPAT, \PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding).
383
+                                                        '></'.htmlspecialchars($type, ENT_COMPAT, \PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding).
384 384
                                                         '>';
385 385
                                             }
386 386
                                             $payload .= "</value></param>\n";
387 387
                                         }
388 388
                                         $alt_payload .= $y->scalarval();
389
-                                        if ($k < $x->count() - 1) {
389
+                                        if ($k<$x->count()-1) {
390 390
                                             $alt_payload .= ';';
391 391
                                             echo ", ";
392 392
                                         }
@@ -399,63 +399,63 @@  discard block
 block discarded – undo
399 399
                             echo '</td>';
400 400
                             // button to test this method
401 401
                             //$payload="<methodCall>\n<methodName>$method</methodName>\n<params>\n$payload</params>\n</methodCall>";
402
-                            echo "<td$class><form action=\"controller.php\" target=\"frmcontroller\" method=\"get\">" .
403
-                                "<input type=\"hidden\" name=\"host\" value=\"" . htmlspecialchars($host, ENT_COMPAT, $inputcharset) . "\" />" .
404
-                                "<input type=\"hidden\" name=\"port\" value=\"" . htmlspecialchars($port, ENT_COMPAT, $inputcharset) . "\" />" .
405
-                                "<input type=\"hidden\" name=\"path\" value=\"" . htmlspecialchars($path, ENT_COMPAT, $inputcharset) . "\" />" .
406
-                                "<input type=\"hidden\" name=\"id\" value=\"" . htmlspecialchars($id, ENT_COMPAT, $inputcharset) . "\" />" .
407
-                                "<input type=\"hidden\" name=\"debug\" value=\"$debug\" />" .
408
-                                "<input type=\"hidden\" name=\"username\" value=\"" . htmlspecialchars($username, ENT_COMPAT, $inputcharset) . "\" />" .
409
-                                "<input type=\"hidden\" name=\"password\" value=\"" . htmlspecialchars($password, ENT_COMPAT, $inputcharset) . "\" />" .
410
-                                "<input type=\"hidden\" name=\"authtype\" value=\"$authtype\" />" .
411
-                                "<input type=\"hidden\" name=\"verifyhost\" value=\"$verifyhost\" />" .
412
-                                "<input type=\"hidden\" name=\"verifypeer\" value=\"$verifypeer\" />" .
413
-                                "<input type=\"hidden\" name=\"cainfo\" value=\"" . htmlspecialchars($cainfo, ENT_COMPAT, $inputcharset) . "\" />" .
414
-                                "<input type=\"hidden\" name=\"proxy\" value=\"" . htmlspecialchars($proxy, ENT_COMPAT, $inputcharset) . "\" />" .
415
-                                "<input type=\"hidden\" name=\"proxyuser\" value=\"" . htmlspecialchars($proxyuser, ENT_COMPAT, $inputcharset) . "\" />" .
416
-                                "<input type=\"hidden\" name=\"proxypwd\" value=\"" . htmlspecialchars($proxypwd, ENT_COMPAT, $inputcharset) . "\" />" .
417
-                                "<input type=\"hidden\" name=\"responsecompression\" value=\"$responsecompression\" />" .
418
-                                "<input type=\"hidden\" name=\"requestcompression\" value=\"$requestcompression\" />" .
419
-                                "<input type=\"hidden\" name=\"clientcookies\" value=\"" . htmlspecialchars($clientcookies, ENT_COMPAT, $inputcharset) . "\" />" .
420
-                                "<input type=\"hidden\" name=\"protocol\" value=\"$protocol\" />" .
421
-                                "<input type=\"hidden\" name=\"timeout\" value=\"" . htmlspecialchars($timeout, ENT_COMPAT, $inputcharset) . "\" />" .
422
-                                "<input type=\"hidden\" name=\"method\" value=\"" . htmlspecialchars($method, ENT_COMPAT, $inputcharset) . "\" />" .
423
-                                "<input type=\"hidden\" name=\"methodpayload\" value=\"" . htmlspecialchars($payload, ENT_COMPAT, $inputcharset) . "\" />" .
424
-                                "<input type=\"hidden\" name=\"altmethodpayload\" value=\"" . htmlspecialchars($alt_payload, ENT_COMPAT, $inputcharset) . "\" />" .
425
-                                "<input type=\"hidden\" name=\"wstype\" value=\"$wstype\" />" .
402
+                            echo "<td$class><form action=\"controller.php\" target=\"frmcontroller\" method=\"get\">".
403
+                                "<input type=\"hidden\" name=\"host\" value=\"".htmlspecialchars($host, ENT_COMPAT, $inputcharset)."\" />".
404
+                                "<input type=\"hidden\" name=\"port\" value=\"".htmlspecialchars($port, ENT_COMPAT, $inputcharset)."\" />".
405
+                                "<input type=\"hidden\" name=\"path\" value=\"".htmlspecialchars($path, ENT_COMPAT, $inputcharset)."\" />".
406
+                                "<input type=\"hidden\" name=\"id\" value=\"".htmlspecialchars($id, ENT_COMPAT, $inputcharset)."\" />".
407
+                                "<input type=\"hidden\" name=\"debug\" value=\"$debug\" />".
408
+                                "<input type=\"hidden\" name=\"username\" value=\"".htmlspecialchars($username, ENT_COMPAT, $inputcharset)."\" />".
409
+                                "<input type=\"hidden\" name=\"password\" value=\"".htmlspecialchars($password, ENT_COMPAT, $inputcharset)."\" />".
410
+                                "<input type=\"hidden\" name=\"authtype\" value=\"$authtype\" />".
411
+                                "<input type=\"hidden\" name=\"verifyhost\" value=\"$verifyhost\" />".
412
+                                "<input type=\"hidden\" name=\"verifypeer\" value=\"$verifypeer\" />".
413
+                                "<input type=\"hidden\" name=\"cainfo\" value=\"".htmlspecialchars($cainfo, ENT_COMPAT, $inputcharset)."\" />".
414
+                                "<input type=\"hidden\" name=\"proxy\" value=\"".htmlspecialchars($proxy, ENT_COMPAT, $inputcharset)."\" />".
415
+                                "<input type=\"hidden\" name=\"proxyuser\" value=\"".htmlspecialchars($proxyuser, ENT_COMPAT, $inputcharset)."\" />".
416
+                                "<input type=\"hidden\" name=\"proxypwd\" value=\"".htmlspecialchars($proxypwd, ENT_COMPAT, $inputcharset)."\" />".
417
+                                "<input type=\"hidden\" name=\"responsecompression\" value=\"$responsecompression\" />".
418
+                                "<input type=\"hidden\" name=\"requestcompression\" value=\"$requestcompression\" />".
419
+                                "<input type=\"hidden\" name=\"clientcookies\" value=\"".htmlspecialchars($clientcookies, ENT_COMPAT, $inputcharset)."\" />".
420
+                                "<input type=\"hidden\" name=\"protocol\" value=\"$protocol\" />".
421
+                                "<input type=\"hidden\" name=\"timeout\" value=\"".htmlspecialchars($timeout, ENT_COMPAT, $inputcharset)."\" />".
422
+                                "<input type=\"hidden\" name=\"method\" value=\"".htmlspecialchars($method, ENT_COMPAT, $inputcharset)."\" />".
423
+                                "<input type=\"hidden\" name=\"methodpayload\" value=\"".htmlspecialchars($payload, ENT_COMPAT, $inputcharset)."\" />".
424
+                                "<input type=\"hidden\" name=\"altmethodpayload\" value=\"".htmlspecialchars($alt_payload, ENT_COMPAT, $inputcharset)."\" />".
425
+                                "<input type=\"hidden\" name=\"wstype\" value=\"$wstype\" />".
426 426
                                 "<input type=\"hidden\" name=\"action\" value=\"execute\" />";
427 427
                             if ($wstype != 1) {
428 428
                                 echo "<input type=\"submit\" value=\"Load method synopsis\" />";
429 429
                             }
430 430
                             echo "</form></td>\n";
431 431
 
432
-                            echo "<td$class><form action=\"controller.php\" target=\"frmcontroller\" method=\"get\">" .
433
-                                "<input type=\"hidden\" name=\"host\" value=\"" . htmlspecialchars($host, ENT_COMPAT, $inputcharset) . "\" />" .
434
-                                "<input type=\"hidden\" name=\"port\" value=\"" . htmlspecialchars($port, ENT_COMPAT, $inputcharset) . "\" />" .
435
-                                "<input type=\"hidden\" name=\"path\" value=\"" . htmlspecialchars($path, ENT_COMPAT, $inputcharset) . "\" />" .
436
-                                "<input type=\"hidden\" name=\"id\" value=\"" . htmlspecialchars($id, ENT_COMPAT, $inputcharset) . "\" />" .
437
-                                "<input type=\"hidden\" name=\"debug\" value=\"$debug\" />" .
438
-                                "<input type=\"hidden\" name=\"username\" value=\"" . htmlspecialchars($username, ENT_COMPAT, $inputcharset) . "\" />" .
439
-                                "<input type=\"hidden\" name=\"password\" value=\"" . htmlspecialchars($password, ENT_COMPAT, $inputcharset) . "\" />" .
440
-                                "<input type=\"hidden\" name=\"authtype\" value=\"$authtype\" />" .
441
-                                "<input type=\"hidden\" name=\"verifyhost\" value=\"$verifyhost\" />" .
442
-                                "<input type=\"hidden\" name=\"verifypeer\" value=\"$verifypeer\" />" .
443
-                                "<input type=\"hidden\" name=\"cainfo\" value=\"" . htmlspecialchars($cainfo, ENT_COMPAT, $inputcharset) . "\" />" .
444
-                                "<input type=\"hidden\" name=\"proxy\" value=\"" . htmlspecialchars($proxy, ENT_COMPAT, $inputcharset) . "\" />" .
445
-                                "<input type=\"hidden\" name=\"proxyuser\" value=\"" . htmlspecialchars($proxyuser, ENT_COMPAT, $inputcharset) . "\" />" .
446
-                                "<input type=\"hidden\" name=\"proxypwd\" value=\"" . htmlspecialchars($proxypwd, ENT_COMPAT, $inputcharset) . "\" />" .
447
-                                "<input type=\"hidden\" name=\"responsecompression\" value=\"$responsecompression\" />" .
448
-                                "<input type=\"hidden\" name=\"requestcompression\" value=\"$requestcompression\" />" .
449
-                                "<input type=\"hidden\" name=\"clientcookies\" value=\"" . htmlspecialchars($clientcookies, ENT_COMPAT, $inputcharset) . "\" />" .
450
-                                "<input type=\"hidden\" name=\"protocol\" value=\"$protocol\" />" .
451
-                                "<input type=\"hidden\" name=\"timeout\" value=\"" . htmlspecialchars($timeout, ENT_COMPAT, $inputcharset) . "\" />" .
452
-                                "<input type=\"hidden\" name=\"method\" value=\"" . htmlspecialchars($method, ENT_COMPAT, $inputcharset) . "\" />" .
453
-                                "<input type=\"hidden\" name=\"methodsig\" value=\"" . $i . "\" />" .
454
-                                "<input type=\"hidden\" name=\"methodpayload\" value=\"" . htmlspecialchars($payload, ENT_COMPAT, $inputcharset) . "\" />" .
455
-                                "<input type=\"hidden\" name=\"altmethodpayload\" value=\"" . htmlspecialchars($alt_payload, ENT_COMPAT, $inputcharset) . "\" />" .
456
-                                "<input type=\"hidden\" name=\"wstype\" value=\"$wstype\" />" .
457
-                                "<input type=\"hidden\" name=\"run\" value=\"now\" />" .
458
-                                "<input type=\"hidden\" name=\"action\" value=\"wrap\" />" .
432
+                            echo "<td$class><form action=\"controller.php\" target=\"frmcontroller\" method=\"get\">".
433
+                                "<input type=\"hidden\" name=\"host\" value=\"".htmlspecialchars($host, ENT_COMPAT, $inputcharset)."\" />".
434
+                                "<input type=\"hidden\" name=\"port\" value=\"".htmlspecialchars($port, ENT_COMPAT, $inputcharset)."\" />".
435
+                                "<input type=\"hidden\" name=\"path\" value=\"".htmlspecialchars($path, ENT_COMPAT, $inputcharset)."\" />".
436
+                                "<input type=\"hidden\" name=\"id\" value=\"".htmlspecialchars($id, ENT_COMPAT, $inputcharset)."\" />".
437
+                                "<input type=\"hidden\" name=\"debug\" value=\"$debug\" />".
438
+                                "<input type=\"hidden\" name=\"username\" value=\"".htmlspecialchars($username, ENT_COMPAT, $inputcharset)."\" />".
439
+                                "<input type=\"hidden\" name=\"password\" value=\"".htmlspecialchars($password, ENT_COMPAT, $inputcharset)."\" />".
440
+                                "<input type=\"hidden\" name=\"authtype\" value=\"$authtype\" />".
441
+                                "<input type=\"hidden\" name=\"verifyhost\" value=\"$verifyhost\" />".
442
+                                "<input type=\"hidden\" name=\"verifypeer\" value=\"$verifypeer\" />".
443
+                                "<input type=\"hidden\" name=\"cainfo\" value=\"".htmlspecialchars($cainfo, ENT_COMPAT, $inputcharset)."\" />".
444
+                                "<input type=\"hidden\" name=\"proxy\" value=\"".htmlspecialchars($proxy, ENT_COMPAT, $inputcharset)."\" />".
445
+                                "<input type=\"hidden\" name=\"proxyuser\" value=\"".htmlspecialchars($proxyuser, ENT_COMPAT, $inputcharset)."\" />".
446
+                                "<input type=\"hidden\" name=\"proxypwd\" value=\"".htmlspecialchars($proxypwd, ENT_COMPAT, $inputcharset)."\" />".
447
+                                "<input type=\"hidden\" name=\"responsecompression\" value=\"$responsecompression\" />".
448
+                                "<input type=\"hidden\" name=\"requestcompression\" value=\"$requestcompression\" />".
449
+                                "<input type=\"hidden\" name=\"clientcookies\" value=\"".htmlspecialchars($clientcookies, ENT_COMPAT, $inputcharset)."\" />".
450
+                                "<input type=\"hidden\" name=\"protocol\" value=\"$protocol\" />".
451
+                                "<input type=\"hidden\" name=\"timeout\" value=\"".htmlspecialchars($timeout, ENT_COMPAT, $inputcharset)."\" />".
452
+                                "<input type=\"hidden\" name=\"method\" value=\"".htmlspecialchars($method, ENT_COMPAT, $inputcharset)."\" />".
453
+                                "<input type=\"hidden\" name=\"methodsig\" value=\"".$i."\" />".
454
+                                "<input type=\"hidden\" name=\"methodpayload\" value=\"".htmlspecialchars($payload, ENT_COMPAT, $inputcharset)."\" />".
455
+                                "<input type=\"hidden\" name=\"altmethodpayload\" value=\"".htmlspecialchars($alt_payload, ENT_COMPAT, $inputcharset)."\" />".
456
+                                "<input type=\"hidden\" name=\"wstype\" value=\"$wstype\" />".
457
+                                "<input type=\"hidden\" name=\"run\" value=\"now\" />".
458
+                                "<input type=\"hidden\" name=\"action\" value=\"wrap\" />".
459 459
                                 "<input type=\"submit\" value=\"Generate method call stub code\" />";
460 460
                             echo "</form></td></tr>\n";
461 461
                         }
@@ -467,14 +467,14 @@  discard block
 block discarded – undo
467 467
                 case 'wrap':
468 468
                     $r1 = $resp[0]->value();
469 469
                     $r2 = $resp[1]->value();
470
-                    if ($r2->kindOf() != "array" || $r2->count() <= $methodsig) {
470
+                    if ($r2->kindOf() != "array" || $r2->count()<=$methodsig) {
471 471
                         echo "Error: signature unknown\n";
472 472
                     } else {
473 473
                         $mdesc = $r1->scalarval();
474 474
                         $encoder = new PhpXmlRpc\Encoder();
475 475
                         $msig = $encoder->decode($r2);
476 476
                         $msig = $msig[$methodsig];
477
-                        $proto = $protocol == 2 ? 'https' : ( $protocol == 1 ? 'http11' : '' );
477
+                        $proto = $protocol == 2 ? 'https' : ($protocol == 1 ? 'http11' : '');
478 478
                         if ($proxy == '' && $username == '' && !$requestcompression && !$responsecompression &&
479 479
                             $clientcookies == ''
480 480
                         ) {
@@ -488,11 +488,11 @@  discard block
 block discarded – undo
488 488
                             $prefix = 'xmlrpc';
489 489
                         }
490 490
                         $wrapper = new PhpXmlRpc\Wrapper();
491
-                        $code = $wrapper->buildWrapMethodSource($client, $method, array('timeout' => $timeout, 'protocol' => $proto, 'simple_client_copy' => $opts, 'prefix' => $prefix), str_replace('.', '_', $prefix . '_' . $method), $msig, $mdesc);
491
+                        $code = $wrapper->buildWrapMethodSource($client, $method, array('timeout' => $timeout, 'protocol' => $proto, 'simple_client_copy' => $opts, 'prefix' => $prefix), str_replace('.', '_', $prefix.'_'.$method), $msig, $mdesc);
492 492
                         //if ($code)
493 493
                         //{
494 494
                         echo "<div id=\"phpcode\">\n";
495
-                        highlight_string("<?php\n" . $code['docstring'] . $code['source'] . '?>');
495
+                        highlight_string("<?php\n".$code['docstring'].$code['source'].'?>');
496 496
                         echo "\n</div>";
497 497
                         //}
498 498
                         //else
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
                     break;
504 504
 
505 505
                 case 'execute':
506
-                    echo '<div id="response"><h2>Response:</h2>' . htmlspecialchars($response->serialize()) . '</div>';
506
+                    echo '<div id="response"><h2>Response:</h2>'.htmlspecialchars($response->serialize()).'</div>';
507 507
                     break;
508 508
 
509 509
                 default: // give a warning
Please login to merge, or discard this patch.
src/Value.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
                     $this->me['struct'] = $val;
120 120
                     break;
121 121
                 default:
122
-                    $this->getLogger()->errorLog("XML-RPC: " . __METHOD__ . ": not a known type ($type)");
122
+                    $this->getLogger()->errorLog("XML-RPC: ".__METHOD__.": not a known type ($type)");
123 123
             }
124 124
         }
125 125
     }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         }
145 145
 
146 146
         if ($typeOf !== 1) {
147
-            $this->getLogger()->errorLog("XML-RPC: " . __METHOD__ . ": not a scalar type ($type)");
147
+            $this->getLogger()->errorLog("XML-RPC: ".__METHOD__.": not a scalar type ($type)");
148 148
             return 0;
149 149
         }
150 150
 
@@ -161,10 +161,10 @@  discard block
 block discarded – undo
161 161
 
162 162
         switch ($this->mytype) {
163 163
             case 1:
164
-                $this->getLogger()->errorLog('XML-RPC: ' . __METHOD__ . ': scalar xmlrpc value can have only one value');
164
+                $this->getLogger()->errorLog('XML-RPC: '.__METHOD__.': scalar xmlrpc value can have only one value');
165 165
                 return 0;
166 166
             case 3:
167
-                $this->getLogger()->errorLog('XML-RPC: ' . __METHOD__ . ': cannot add anonymous scalar to struct xmlrpc value');
167
+                $this->getLogger()->errorLog('XML-RPC: '.__METHOD__.': cannot add anonymous scalar to struct xmlrpc value');
168 168
                 return 0;
169 169
             case 2:
170 170
                 // we're adding a scalar value to an array here
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 
207 207
             return 1;
208 208
         } else {
209
-            $this->getLogger()->errorLog('XML-RPC: ' . __METHOD__ . ': already initialized as a [' . $this->kindOf() . ']');
209
+            $this->getLogger()->errorLog('XML-RPC: '.__METHOD__.': already initialized as a ['.$this->kindOf().']');
210 210
             return 0;
211 211
         }
212 212
     }
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 
238 238
             return 1;
239 239
         } else {
240
-            $this->getLogger()->errorLog('XML-RPC: ' . __METHOD__ . ': already initialized as a [' . $this->kindOf() . ']');
240
+            $this->getLogger()->errorLog('XML-RPC: '.__METHOD__.': already initialized as a ['.$this->kindOf().']');
241 241
             return 0;
242 242
         }
243 243
     }
@@ -279,19 +279,19 @@  discard block
 block discarded – undo
279 279
             case 1:
280 280
                 switch ($typ) {
281 281
                     case static::$xmlrpcBase64:
282
-                        $rs .= "<${typ}>" . base64_encode($val) . "</${typ}>";
282
+                        $rs .= "<${typ}>".base64_encode($val)."</${typ}>";
283 283
                         break;
284 284
                     case static::$xmlrpcBoolean:
285
-                        $rs .= "<${typ}>" . ($val ? '1' : '0') . "</${typ}>";
285
+                        $rs .= "<${typ}>".($val ? '1' : '0')."</${typ}>";
286 286
                         break;
287 287
                     case static::$xmlrpcString:
288 288
                         // Do NOT use htmlentities, since it will produce named html entities, which are invalid xml
289
-                        $rs .= "<${typ}>" . $this->getCharsetEncoder()->encodeEntities($val, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding) . "</${typ}>";
289
+                        $rs .= "<${typ}>".$this->getCharsetEncoder()->encodeEntities($val, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding)."</${typ}>";
290 290
                         break;
291 291
                     case static::$xmlrpcInt:
292 292
                     case static::$xmlrpcI4:
293 293
                     case static::$xmlrpcI8:
294
-                        $rs .= "<${typ}>" . (int)$val . "</${typ}>";
294
+                        $rs .= "<${typ}>".(int) $val."</${typ}>";
295 295
                         break;
296 296
                     case static::$xmlrpcDouble:
297 297
                         // avoid using standard conversion of float to string because it is locale-dependent,
@@ -299,16 +299,16 @@  discard block
 block discarded – undo
299 299
                         // sprintf('%F') could be most likely ok but it fails eg. on 2e-14.
300 300
                         // The code below tries its best at keeping max precision while avoiding exp notation,
301 301
                         // but there is of course no limit in the number of decimal places to be used...
302
-                        $rs .= "<${typ}>" . preg_replace('/\\.?0+$/', '', number_format((double)$val, PhpXmlRpc::$xmlpc_double_precision, '.', '')) . "</${typ}>";
302
+                        $rs .= "<${typ}>".preg_replace('/\\.?0+$/', '', number_format((double) $val, PhpXmlRpc::$xmlpc_double_precision, '.', ''))."</${typ}>";
303 303
                         break;
304 304
                     case static::$xmlrpcDateTime:
305 305
                         if (is_string($val)) {
306 306
                             $rs .= "<${typ}>${val}</${typ}>";
307 307
                         // DateTimeInterface is not present in php 5.4...
308 308
                         } elseif (is_a($val, 'DateTimeInterface') || is_a($val, 'DateTime')) {
309
-                            $rs .= "<${typ}>" . $val->format('Ymd\TH:i:s') . "</${typ}>";
309
+                            $rs .= "<${typ}>".$val->format('Ymd\TH:i:s')."</${typ}>";
310 310
                         } elseif (is_int($val)) {
311
-                            $rs .= "<${typ}>" . date('Ymd\TH:i:s', $val) . "</${typ}>";
311
+                            $rs .= "<${typ}>".date('Ymd\TH:i:s', $val)."</${typ}>";
312 312
                         } else {
313 313
                             // not really a good idea here: but what should we output anyway? left for backward compat...
314 314
                             $rs .= "<${typ}>${val}</${typ}>";
@@ -330,14 +330,14 @@  discard block
 block discarded – undo
330 330
             case 3:
331 331
                 // struct
332 332
                 if ($this->_php_class) {
333
-                    $rs .= '<struct php_class="' . $this->_php_class . "\">\n";
333
+                    $rs .= '<struct php_class="'.$this->_php_class."\">\n";
334 334
                 } else {
335 335
                     $rs .= "<struct>\n";
336 336
                 }
337 337
                 $charsetEncoder = $this->getCharsetEncoder();
338 338
                 /** @var Value $val2 */
339 339
                 foreach ($val as $key2 => $val2) {
340
-                    $rs .= '<member><name>' . $charsetEncoder->encodeEntities($key2, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding) . "</name>\n";
340
+                    $rs .= '<member><name>'.$charsetEncoder->encodeEntities($key2, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding)."</name>\n";
341 341
                     //$rs.=$this->serializeval($val2);
342 342
                     $rs .= $val2->serialize($charsetEncoding);
343 343
                     $rs .= "</member>\n";
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
         $val = reset($this->me);
374 374
         $typ = key($this->me);
375 375
 
376
-        return '<value>' . $this->serializedata($typ, $val, $charsetEncoding) . "</value>\n";
376
+        return '<value>'.$this->serializedata($typ, $val, $charsetEncoding)."</value>\n";
377 377
     }
378 378
 
379 379
     /**
Please login to merge, or discard this patch.
tests/PolyfillTestCase.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -2,20 +2,20 @@
 block discarded – undo
2 2
 
3 3
 use PHPUnit\Runner\Version as PHPUnit_Version;
4 4
 
5
-if ( class_exists( 'PHPUnit_Extensions_SeleniumCommon_RemoteCoverage' ) === true
6
-    && class_exists( 'PHPUnit\Extensions\SeleniumCommon\RemoteCoverage' ) === false
5
+if (class_exists('PHPUnit_Extensions_SeleniumCommon_RemoteCoverage') === true
6
+    && class_exists('PHPUnit\Extensions\SeleniumCommon\RemoteCoverage') === false
7 7
 ) {
8
-    class_alias( 'PHPUnit_Extensions_SeleniumCommon_RemoteCoverage', 'PHPUnit\Extensions\SeleniumCommon\RemoteCoverage' );
8
+    class_alias('PHPUnit_Extensions_SeleniumCommon_RemoteCoverage', 'PHPUnit\Extensions\SeleniumCommon\RemoteCoverage');
9 9
 }
10 10
 
11
-if ( class_exists( 'PHPUnit_Runner_BaseTestRunner' ) === true
12
-    && class_exists( 'PHPUnit\Runner\BaseTestRunner' ) === false
11
+if (class_exists('PHPUnit_Runner_BaseTestRunner') === true
12
+    && class_exists('PHPUnit\Runner\BaseTestRunner') === false
13 13
 ) {
14
-    class_alias( 'PHPUnit_Runner_BaseTestRunner', 'PHPUnit\Runner\BaseTestRunner' );
14
+    class_alias('PHPUnit_Runner_BaseTestRunner', 'PHPUnit\Runner\BaseTestRunner');
15 15
 }
16 16
 
17 17
 if (class_exists('PHPUnit\Runner\Version') === false || version_compare(PHPUnit_Version::id(), '8.0.0', '<')) {
18
-    include_once __DIR__ . '/PolyfillTestCase7.php';
18
+    include_once __DIR__.'/PolyfillTestCase7.php';
19 19
 } else {
20
-    include_once __DIR__ . '/PolyfillTestCase8.php';
20
+    include_once __DIR__.'/PolyfillTestCase8.php';
21 21
 }
Please login to merge, or discard this patch.