Completed
Push — master ( b7b153...3167db )
by Gaetano
07:37
created
tests/2InvalidHostTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include_once __DIR__ . '/../lib/xmlrpc.inc';
3
+include_once __DIR__.'/../lib/xmlrpc.inc';
4 4
 
5
-include_once __DIR__ . '/parse_args.php';
5
+include_once __DIR__.'/parse_args.php';
6 6
 
7 7
 /**
8 8
  * Tests involving requests sent to non-existing servers
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         // make sure there's no freaking catchall DNS in effect
56 56
         $dnsinfo = dns_get_record($this->client->server);
57 57
         if ($dnsinfo) {
58
-            $this->markTestSkipped('Seems like there is a catchall DNS in effect: host ' . $this->client->server . ' found');
58
+            $this->markTestSkipped('Seems like there is a catchall DNS in effect: host '.$this->client->server.' found');
59 59
         } else {
60 60
             $this->assertEquals(5, $r->faultCode());
61 61
         }
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
         // now test a successful connection
82 82
         $server = explode(':', $this->args['LOCALSERVER']);
83
-        if (count($server) > 1) {
83
+        if (count($server)>1) {
84 84
             $this->client->port = $server[1];
85 85
         }
86 86
         $this->client->server = $server[0];
Please login to merge, or discard this patch.
tests/7ExtraTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include_once __DIR__ . '/LocalFileTestCase.php';
3
+include_once __DIR__.'/LocalFileTestCase.php';
4 4
 
5 5
 /**
6 6
  * Tests for php files in the 'extras' directory
@@ -11,9 +11,9 @@  discard block
 block discarded – undo
11 11
     {
12 12
         $this->args = argParser::getArgs();
13 13
 
14
-        $this->baseUrl = $this->args['LOCALSERVER'] . str_replace( '/demo/server/server.php', '/tests/', $this->args['URI'] );
14
+        $this->baseUrl = $this->args['LOCALSERVER'].str_replace('/demo/server/server.php', '/tests/', $this->args['URI']);
15 15
 
16
-        $this->coverageScriptUrl = 'http://' . $this->args['LOCALSERVER'] . '/' . str_replace( '/demo/server/server.php', 'tests/phpunit_coverage.php', $this->args['URI'] );
16
+        $this->coverageScriptUrl = 'http://'.$this->args['LOCALSERVER'].'/'.str_replace('/demo/server/server.php', 'tests/phpunit_coverage.php', $this->args['URI']);
17 17
     }
18 18
 
19 19
     public function testVerifyCompat()
Please login to merge, or discard this patch.
tests/5DemofilesTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include_once __DIR__ . '/LocalFileTestCase.php';
3
+include_once __DIR__.'/LocalFileTestCase.php';
4 4
 
5 5
 /**
6 6
  * Tests for php files in the 'demo' directory
@@ -11,9 +11,9 @@  discard block
 block discarded – undo
11 11
     {
12 12
         $this->args = argParser::getArgs();
13 13
 
14
-        $this->baseUrl = $this->args['LOCALSERVER'] . str_replace( '/demo/server/server.php', '/demo/', $this->args['URI'] );
14
+        $this->baseUrl = $this->args['LOCALSERVER'].str_replace('/demo/server/server.php', '/demo/', $this->args['URI']);
15 15
 
16
-        $this->coverageScriptUrl = 'http://' . $this->args['LOCALSERVER'] . '/' . str_replace( '/demo/server/server.php', 'tests/phpunit_coverage.php', $this->args['URI'] );
16
+        $this->coverageScriptUrl = 'http://'.$this->args['LOCALSERVER'].'/'.str_replace('/demo/server/server.php', 'tests/phpunit_coverage.php', $this->args['URI']);
17 17
     }
18 18
 
19 19
     public function testAgeSort()
Please login to merge, or discard this patch.
demo/server/discuss.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include_once __DIR__ . "/../../vendor/autoload.php";
3
+include_once __DIR__."/../../vendor/autoload.php";
4 4
 
5 5
 use PhpXmlRpc\Value;
6 6
 
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
             $count = 0;
32 32
         }
33 33
         // add the new comment in
34
-        dba_insert($msgID . "_comment_${count}", $comment, $dbh);
35
-        dba_insert($msgID . "_name_${count}", $name, $dbh);
34
+        dba_insert($msgID."_comment_${count}", $comment, $dbh);
35
+        dba_insert($msgID."_name_${count}", $name, $dbh);
36 36
         $count++;
37 37
         dba_replace($countID, $count, $dbh);
38 38
         dba_close($dbh);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         $countID = "${msgID}_count";
66 66
         if (dba_exists($countID, $dbh)) {
67 67
             $count = dba_fetch($countID, $dbh);
68
-            for ($i = 0; $i < $count; $i++) {
68
+            for ($i = 0; $i<$count; $i++) {
69 69
                 $name = dba_fetch("${msgID}_name_${i}", $dbh);
70 70
                 $comment = dba_fetch("${msgID}_comment_${i}", $dbh);
71 71
                 // push a new struct onto the return array
Please login to merge, or discard this patch.
demo/server/proxy.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @license code licensed under the BSD License: see file license.txt
10 10
  */
11 11
 
12
-include_once __DIR__ . "/../../src/Autoloader.php";
12
+include_once __DIR__."/../../src/Autoloader.php";
13 13
 PhpXmlRpc\Autoloader::register();
14 14
 
15 15
 /**
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     $url = $encoder->decode($req->getParam(0));
31 31
     $client = new PhpXmlRpc\Client($url);
32 32
 
33
-    if ($req->getNumParams() > 3) {
33
+    if ($req->getNumParams()>3) {
34 34
         // we have to set some options onto the client.
35 35
         // Note that if we do not untaint the received values, warnings might be generated...
36 36
         $options = $encoder->decode($req->getParam(3));
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
                     $client->setSSLVerifyPeer($val);
51 51
                     break;
52 52
                 case 'Timeout':
53
-                    $timeout = (integer)$val;
53
+                    $timeout = (integer) $val;
54 54
                     break;
55 55
             } // switch
56 56
         }
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     }
69 69
 
70 70
     // add debug info into response we give back to caller
71
-    PhpXmlRpc\Server::xmlrpc_debugmsg("Sending to server $url the payload: " . $req->serialize());
71
+    PhpXmlRpc\Server::xmlrpc_debugmsg("Sending to server $url the payload: ".$req->serialize());
72 72
 
73 73
     return $client->send($req, $timeout);
74 74
 }
Please login to merge, or discard this patch.
demo/client/wrap.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@  discard block
 block discarded – undo
12 12
 </h3>
13 13
 <?php
14 14
 
15
-include_once __DIR__ . "/../../src/Autoloader.php";
15
+include_once __DIR__."/../../src/Autoloader.php";
16 16
 PhpXmlRpc\Autoloader::register();
17 17
 
18 18
 $client = new PhpXmlRpc\Client("http://phpxmlrpc.sourceforge.net/server.php");
19 19
 $client->return_type = 'phpvals'; // let client give us back php values instead of xmlrpcvals
20 20
 $resp = $client->send(new PhpXmlRpc\Request('system.listMethods'));
21 21
 if ($resp->faultCode()) {
22
-    echo "<p>Server methods list could not be retrieved: error {$resp->faultCode()} '" . htmlspecialchars($resp->faultString()) . "'</p>\n";
22
+    echo "<p>Server methods list could not be retrieved: error {$resp->faultCode()} '".htmlspecialchars($resp->faultString())."'</p>\n";
23 23
 } else {
24 24
     echo "<p>Server methods list retrieved, now wrapping it up...</p>\n<ul>\n";
25 25
     flush();
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
         if ($methodName == 'examples.getStateName') {
32 32
             $callable = $wrapper->wrapXmlrpcMethod($client, $methodName);
33 33
             if ($callable) {
34
-                echo "<li>Remote server method " . htmlspecialchars($methodName) . " wrapped into php function</li>\n";
34
+                echo "<li>Remote server method ".htmlspecialchars($methodName)." wrapped into php function</li>\n";
35 35
             } else {
36
-                echo "<li>Remote server method " . htmlspecialchars($methodName) . " could not be wrapped!</li>\n";
36
+                echo "<li>Remote server method ".htmlspecialchars($methodName)." could not be wrapped!</li>\n";
37 37
             }
38 38
             break;
39 39
         }
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
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 <h3>The code demonstrates usage for the terminally lazy. For a more complete proxy, look at at the Wrapper class</h3>
7 7
 <?php
8 8
 
9
-include_once __DIR__ . "/../../src/Autoloader.php";
9
+include_once __DIR__."/../../src/Autoloader.php";
10 10
 PhpXmlRpc\Autoloader::register();
11 11
 
12 12
 class PhpXmlRpcProxy
Please login to merge, or discard this patch.
demo/client/which.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 <h3>The code demonstrates usage of the PhpXmlRpc\Encoder class</h3>
7 7
 <?php
8 8
 
9
-include_once __DIR__ . "/../../src/Autoloader.php";
9
+include_once __DIR__."/../../src/Autoloader.php";
10 10
 PhpXmlRpc\Autoloader::register();
11 11
 
12 12
 $req = new PhpXmlRpc\Request('interopEchoTests.whichToolkit', array());
@@ -16,14 +16,14 @@  discard block
 block discarded – undo
16 16
     $encoder = new PhpXmlRpc\Encoder();
17 17
     $value = $encoder->decode($resp->value());
18 18
     print "<pre>";
19
-    print "name: " . htmlspecialchars($value["toolkitName"]) . "\n";
20
-    print "version: " . htmlspecialchars($value["toolkitVersion"]) . "\n";
21
-    print "docs: " . htmlspecialchars($value["toolkitDocsUrl"]) . "\n";
22
-    print "os: " . htmlspecialchars($value["toolkitOperatingSystem"]) . "\n";
19
+    print "name: ".htmlspecialchars($value["toolkitName"])."\n";
20
+    print "version: ".htmlspecialchars($value["toolkitVersion"])."\n";
21
+    print "docs: ".htmlspecialchars($value["toolkitDocsUrl"])."\n";
22
+    print "os: ".htmlspecialchars($value["toolkitOperatingSystem"])."\n";
23 23
     print "</pre>";
24 24
 } else {
25 25
     print "An error occurred: ";
26
-    print "Code: " . htmlspecialchars($resp->faultCode()) . " Reason: '" . htmlspecialchars($resp->faultString()) . "'\n";
26
+    print "Code: ".htmlspecialchars($resp->faultCode())." Reason: '".htmlspecialchars($resp->faultString())."'\n";
27 27
 }
28 28
 ?>
29 29
 </body>
Please login to merge, or discard this patch.
demo/client/getstatename.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,34 +8,34 @@
 block discarded – undo
8 8
 <h3>The code demonstrates usage of automatic encoding/decoding of php variables into xmlrpc values</h3>
9 9
 <?php
10 10
 
11
-include_once __DIR__ . "/../../src/Autoloader.php";
11
+include_once __DIR__."/../../src/Autoloader.php";
12 12
 PhpXmlRpc\Autoloader::register();
13 13
 
14 14
 if (isset($_POST["stateno"]) && $_POST["stateno"] != "") {
15
-    $stateNo = (integer)$_POST["stateno"];
15
+    $stateNo = (integer) $_POST["stateno"];
16 16
     $encoder = new PhpXmlRpc\Encoder();
17 17
     $req = new PhpXmlRpc\Request('examples.getStateName',
18 18
         array($encoder->encode($stateNo))
19 19
     );
20
-    print "Sending the following request:<pre>\n\n" . htmlentities($req->serialize()) . "\n\n</pre>Debug info of server data follows...\n\n";
20
+    print "Sending the following request:<pre>\n\n".htmlentities($req->serialize())."\n\n</pre>Debug info of server data follows...\n\n";
21 21
     $client = new PhpXmlRpc\Client("http://phpxmlrpc.sourceforge.net/server.php");
22 22
     $client->setDebug(1);
23 23
     $r = $client->send($req);
24 24
     if (!$r->faultCode()) {
25 25
         $v = $r->value();
26
-        print "<br/>State number <b>" . $stateNo . "</b> is <b>"
27
-            . htmlspecialchars($encoder->decode($v)) . "</b><br/>";
26
+        print "<br/>State number <b>".$stateNo."</b> is <b>"
27
+            . htmlspecialchars($encoder->decode($v))."</b><br/>";
28 28
     } else {
29 29
         print "An error occurred: ";
30
-        print "Code: " . htmlspecialchars($r->faultCode())
31
-            . " Reason: '" . htmlspecialchars($r->faultString()) . "'</pre><br/>";
30
+        print "Code: ".htmlspecialchars($r->faultCode())
31
+            . " Reason: '".htmlspecialchars($r->faultString())."'</pre><br/>";
32 32
     }
33 33
 } else {
34 34
     $stateNo = "";
35 35
 }
36 36
 
37 37
 print "<form action=\"getstatename.php\" method=\"POST\">
38
-<input name=\"stateno\" value=\"" . $stateNo . "\"><input type=\"submit\" value=\"go\" name=\"submit\"></form>
38
+<input name=\"stateno\" value=\"" . $stateNo."\"><input type=\"submit\" value=\"go\" name=\"submit\"></form>
39 39
 <p>Enter a state number to query its name</p>";
40 40
 
41 41
 ?>
Please login to merge, or discard this patch.