Passed
Push — master ( 8ff19d...02b7f4 )
by Gaetano
05:49
created
tests/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
         chmod($GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY'], 0777);
16 16
     }
17 17
 
18
-    include_once __DIR__ . "/../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/prepend.php";
18
+    include_once __DIR__."/../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/prepend.php";
19 19
 }
20 20
 
21 21
 $targetFile = null;
@@ -38,5 +38,5 @@  discard block
 block discarded – undo
38 38
 }
39 39
 
40 40
 if (isset($_COOKIE['PHPUNIT_SELENIUM_TEST_ID']) && extension_loaded('xdebug')) {
41
-    include_once __DIR__ . "/../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/append.php";
41
+    include_once __DIR__."/../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/append.php";
42 42
 }
Please login to merge, or discard this patch.
debugger/index.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 if (isset($_GET['run'])) {
5 5
     $path = parse_url($_GET['run']);
6 6
     if (isset($path['query'])) {
7
-        $query = '?' . $path['query'];
7
+        $query = '?'.$path['query'];
8 8
     }
9 9
 }
10 10
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,12 @@
 block discarded – undo
13 13
 <html lang="en">
14 14
 <head>
15 15
     <link rel="icon" type="image/vnd.microsoft.icon" href="favicon.ico">
16
-    <title><?php if (defined('DEFAULT_WSTYPE') && DEFAULT_WSTYPE == 1) echo 'JSON-RPC'; else echo 'XML-RPC'; ?> Debugger</title>
16
+    <title><?php if (defined('DEFAULT_WSTYPE') && DEFAULT_WSTYPE == 1) {
17
+    echo 'JSON-RPC';
18
+} else {
19
+    echo 'XML-RPC';
20
+}
21
+?> Debugger</title>
17 22
 </head>
18 23
 <frameset rows="360,*">
19 24
     <frame name="frmcontroller" src="controller.php<?php echo htmlspecialchars($query); ?>" marginwidth="0"
Please login to merge, or discard this patch.
demo/client/parallel.php 1 patch
Spacing   +15 added lines, -15 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
 use PhpXmlRpc\Encoder;
5 5
 use PhpXmlRpc\Client;
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         $handles = array();
25 25
         $curl = curl_multi_init();
26 26
 
27
-        foreach($requests as $k => $req) {
27
+        foreach ($requests as $k => $req) {
28 28
             $req->setDebug($this->debug);
29 29
 
30 30
             $handle = $this->prepareCurlHandle(
@@ -57,19 +57,19 @@  discard block
 block discarded – undo
57 57
         $running = 0;
58 58
         do {
59 59
             curl_multi_exec($curl, $running);
60
-        } while($running > 0);
60
+        } while ($running>0);
61 61
 
62 62
         $responses = array();
63
-        foreach($handles as $k => $h) {
63
+        foreach ($handles as $k => $h) {
64 64
             $responses[$k] = curl_multi_getcontent($handles[$k]);
65 65
 
66
-            if ($this->debug > 1) {
66
+            if ($this->debug>1) {
67 67
                 $message = "---CURL INFO---\n";
68 68
                 foreach (curl_getinfo($h) as $name => $val) {
69 69
                     if (is_array($val)) {
70 70
                         $val = implode("\n", $val);
71 71
                     }
72
-                    $message .= $name . ': ' . $val . "\n";
72
+                    $message .= $name.': '.$val."\n";
73 73
                 }
74 74
                 $message .= '---END---';
75 75
                 $this->getLogger()->debugMessage($message);
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
80 80
         }
81 81
         curl_multi_close($curl);
82 82
 
83
-        foreach($responses as $k => $resp) {
83
+        foreach ($responses as $k => $resp) {
84 84
             if (!$resp) {
85
-                $responses[$k] = new Response(0, PhpXmlRpc::$xmlrpcerr['curl_fail'], PhpXmlRpc::$xmlrpcstr['curl_fail'] . ': ' . curl_error($curl));
85
+                $responses[$k] = new Response(0, PhpXmlRpc::$xmlrpcerr['curl_fail'], PhpXmlRpc::$xmlrpcstr['curl_fail'].': '.curl_error($curl));
86 86
             } else {
87 87
                 $responses[$k] = $requests[$k]->parseResponse($resp, true, $this->return_type);
88 88
             }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 $value = $encoder->encode($data, array('auto_dates'));
100 100
 $req = new Request('interopEchoTests.echoValue', array($value));
101 101
 $reqs = array();
102
-for ($i = 0; $i < $num_tests; $i++) {
102
+for ($i = 0; $i<$num_tests; $i++) {
103 103
     $reqs[] = $req;
104 104
 }
105 105
 
@@ -114,18 +114,18 @@  discard block
 block discarded – undo
114 114
 
115 115
 $t = microtime(true);
116 116
 $resp = $client->send($reqs);
117
-$t = microtime(true) - $t;
118
-echo "Sequential send: " . sprintf('%.3f', $t) . " secs.\n";
117
+$t = microtime(true)-$t;
118
+echo "Sequential send: ".sprintf('%.3f', $t)." secs.\n";
119 119
 flush();
120 120
 
121 121
 $t = microtime(true);
122 122
 $resp = $client->sendParallel($reqs);
123
-$t = microtime(true) - $t;
124
-echo "Parallel send: " . sprintf('%.3f', $t) . " secs.\n";
123
+$t = microtime(true)-$t;
124
+echo "Parallel send: ".sprintf('%.3f', $t)." secs.\n";
125 125
 flush();
126 126
 
127 127
 $client->no_multicall = false;
128 128
 $t = microtime(true);
129 129
 $resp = $client->send($reqs);
130
-$t = microtime(true) - $t;
131
-echo "Multicall send: " . sprintf('%.3f', $t) . " secs.\n";
130
+$t = microtime(true)-$t;
131
+echo "Multicall send: ".sprintf('%.3f', $t)." secs.\n";
Please login to merge, or discard this patch.
tests/phpunit_coverage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * @license code licensed under the BSD License: see file license.txt
7 7
  **/
8 8
 
9
-$coverageFile = realpath(__DIR__ . "/../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/phpunit_coverage.php");
9
+$coverageFile = realpath(__DIR__."/../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/phpunit_coverage.php");
10 10
 
11 11
 // has to be the same value as used in index.php
12 12
 $GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY'] = '/tmp/phpxmlrpc_coverage';
Please login to merge, or discard this patch.
tests/parse_args.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         // check for command line params (passed as env vars) vs. web page input params (passed as GET/POST)
47 47
         // Note that the only usecase for web-page mode is when this is used by benchmark.php
48 48
         if (!isset($_SERVER['REQUEST_METHOD'])) {
49
-            foreach($_SERVER as $key => $val) {
49
+            foreach ($_SERVER as $key => $val) {
50 50
                 if (array_key_exists($key, $args)) {
51 51
                     $$key = $val;
52 52
                 }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             //}
92 92
         }
93 93
         if ($HTTPURI[0] != '/') {
94
-            $HTTPURI = '/' . $HTTPURI;
94
+            $HTTPURI = '/'.$HTTPURI;
95 95
         }
96 96
         $args['HTTPURI'] = $HTTPURI;
97 97
 
@@ -105,21 +105,21 @@  discard block
 block discarded – undo
105 105
         }
106 106
 
107 107
         if (isset($HTTPSIGNOREPEER)) {
108
-            $args['HTTPSIGNOREPEER'] = (bool)$HTTPSIGNOREPEER;
108
+            $args['HTTPSIGNOREPEER'] = (bool) $HTTPSIGNOREPEER;
109 109
         }
110 110
 
111 111
         if (isset($HTTPSVERIFYHOST)) {
112
-            $args['HTTPSVERIFYHOST'] = (int)$HTTPSVERIFYHOST;
112
+            $args['HTTPSVERIFYHOST'] = (int) $HTTPSVERIFYHOST;
113 113
         }
114 114
 
115 115
         if (isset($SSLVERSION)) {
116
-            $args['SSLVERSION'] = (int)$SSLVERSION;
116
+            $args['SSLVERSION'] = (int) $SSLVERSION;
117 117
         }
118 118
 
119 119
         if (isset($PROXYSERVER)) {
120 120
             $arr = explode(':', $PROXYSERVER);
121 121
             $args['PROXYSERVER'] = $arr[0];
122
-            if (count($arr) > 1) {
122
+            if (count($arr)>1) {
123 123
                 $args['PROXYPORT'] = $arr[1];
124 124
             } else {
125 125
                 $args['PROXYPORT'] = 8080;
Please login to merge, or discard this patch.
demo/server/methodProviders/testsuite.php 2 patches
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -66,11 +66,12 @@
 block discarded – undo
66 66
     $a = $req->getParam(0);
67 67
     $b = $req->getParam(1);
68 68
 
69
-    if ($a->scalartyp() == Value::$xmlrpcNull)
70
-        return new Response(new Value(plain_findstate($b->scalarval())));
71
-    else
72
-        return new Response(new Value(plain_findstate($a->scalarval())));
73
-}
69
+    if ($a->scalartyp() == Value::$xmlrpcNull) {
70
+            return new Response(new Value(plain_findstate($b->scalarval())));
71
+    } else {
72
+            return new Response(new Value(plain_findstate($a->scalarval())));
73
+    }
74
+    }
74 75
 
75 76
 return array(
76 77
     "tests.getallheaders" => array(
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
 
92 92
     // Greek word 'kosme'. NB: NOT a valid ISO8859 string!
93 93
     // NB: we can only register this when setting internal encoding to UTF-8, or it will break system.listMethods
94
-    "tests.utf8methodname." . 'κόσμε' => array(
94
+    "tests.utf8methodname.".'κόσμε' => array(
95 95
         "function" => "exampleMethods::stringEcho",
96 96
         "signature" => exampleMethods::$stringecho_sig,
97 97
         "docstring" => exampleMethods::$stringecho_doc,
Please login to merge, or discard this patch.
demo/client/which.php 1 patch
Spacing   +8 added lines, -8 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>phpxmlrpc - Which toolkit demo</title></head>
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     <methodName>interopEchoTests.whichToolkit</methodName>
20 20
     <params/>
21 21
 </methodCall>';
22
-output("XML custom request:<br/><pre>" . htmlspecialchars($payload) . "</pre>\n");
22
+output("XML custom request:<br/><pre>".htmlspecialchars($payload)."</pre>\n");
23 23
 
24 24
 $client = new Client(XMLRPCSERVER);
25 25
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 if (!$resp->faultCode()) {
41 41
 
42 42
     $xml = $resp->value();
43
-    output("XML response:<br/><pre>" . htmlspecialchars($xml) . "</pre>\n");
43
+    output("XML response:<br/><pre>".htmlspecialchars($xml)."</pre>\n");
44 44
 
45 45
     $encoder = new Encoder();
46 46
     // from xml to xml-rpc Response
@@ -52,14 +52,14 @@  discard block
 block discarded – undo
52 52
 
53 53
     output("Toolkit info:<br/>\n");
54 54
     output("<pre>");
55
-    output("name: " . htmlspecialchars($value["toolkitName"]) . "\n");
56
-    output("version: " . htmlspecialchars($value["toolkitVersion"]) . "\n");
57
-    output("docs: " . htmlspecialchars($value["toolkitDocsUrl"]) . "\n");
58
-    output("os: " . htmlspecialchars($value["toolkitOperatingSystem"]) . "\n");
55
+    output("name: ".htmlspecialchars($value["toolkitName"])."\n");
56
+    output("version: ".htmlspecialchars($value["toolkitVersion"])."\n");
57
+    output("docs: ".htmlspecialchars($value["toolkitDocsUrl"])."\n");
58
+    output("os: ".htmlspecialchars($value["toolkitOperatingSystem"])."\n");
59 59
     output("</pre>");
60 60
 } else {
61 61
     output("An error occurred: ");
62
-    output("Code: " . htmlspecialchars($resp->faultCode()) . " Reason: '" . htmlspecialchars($resp->faultString()) . "'\n");
62
+    output("Code: ".htmlspecialchars($resp->faultCode())." Reason: '".htmlspecialchars($resp->faultString())."'\n");
63 63
 }
64 64
 
65 65
 output("</body></html>\n");
Please login to merge, or discard this patch.
demo/client/getstatename.php 1 patch
Spacing   +7 added lines, -7 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>phpxmlrpc - Getstatename demo</title></head>
@@ -17,13 +17,13 @@  discard block
 block discarded – undo
17 17
 $stateNo = "";
18 18
 
19 19
 if (isset($_POST['stateno']) && $_POST['stateno'] != "") {
20
-    $stateNo = (integer)$_POST['stateno'];
20
+    $stateNo = (integer) $_POST['stateno'];
21 21
     $method = 'examples.getStateName';
22 22
     $arguments = array(
23 23
         new Value($stateNo, Value::$xmlrpcInt),
24 24
     );
25 25
     $req = new Request($method, $arguments);
26
-    output("Sending the following request:<pre>\n\n" . htmlentities($req->serialize()) .
26
+    output("Sending the following request:<pre>\n\n".htmlentities($req->serialize()).
27 27
         "\n\n</pre>Debug info of server data follows...\n\n");
28 28
     $client = new Client(XMLRPCSERVER);
29 29
     $client->setDebug(1);
@@ -32,12 +32,12 @@  discard block
 block discarded – undo
32 32
         $val = $resp->value();
33 33
         // NB: we are _assuming_ that the server did return a scalar xml-rpc value here.
34 34
         // If the server is not trusted, we might check that via `$val->kindOf() == 'scalar'`
35
-        output('<br/>State number <b>' . $stateNo . '</b> is <b>'
36
-            . htmlspecialchars($val->scalarval()) . '</b><br/><br/>');
35
+        output('<br/>State number <b>'.$stateNo.'</b> is <b>'
36
+            . htmlspecialchars($val->scalarval()).'</b><br/><br/>');
37 37
     } else {
38 38
         output('An error occurred: ');
39
-        output('<pre>Code: ' . htmlspecialchars($resp->faultCode())
40
-            . " Reason: '" . htmlspecialchars($resp->faultString()) . "'</pre>");
39
+        output('<pre>Code: '.htmlspecialchars($resp->faultCode())
40
+            . " Reason: '".htmlspecialchars($resp->faultString())."'</pre>");
41 41
     }
42 42
 }
43 43
 
Please login to merge, or discard this patch.
demo/client/proxy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 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>phpxmlrpc - Proxy demo</title></head>
Please login to merge, or discard this patch.