Completed
Push — master ( 56cddc...8f4643 )
by Gaetano
09:25
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/agesort.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -10,13 +10,13 @@  discard block
 block discarded – undo
10 10
 <p></p>
11 11
 <?php
12 12
 
13
-include_once __DIR__ . "/../../src/Autoloader.php";
13
+include_once __DIR__."/../../src/Autoloader.php";
14 14
 PhpXmlRpc\Autoloader::register();
15 15
 
16 16
 $inAr = array("Dave" => 24, "Edd" => 45, "Joe" => 37, "Fred" => 27);
17 17
 print "This is the input data:<br/><pre>";
18
-foreach($inAr as $key => $val) {
19
-    print $key . ", " . $val . "\n";
18
+foreach ($inAr as $key => $val) {
19
+    print $key.", ".$val."\n";
20 20
 }
21 21
 print "</pre>";
22 22
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     );
33 33
 }
34 34
 $v = new PhpXmlRpc\Value($p, "array");
35
-print "Encoded into xmlrpc format it looks like this: <pre>\n" . htmlentities($v->serialize()) . "</pre>\n";
35
+print "Encoded into xmlrpc format it looks like this: <pre>\n".htmlentities($v->serialize())."</pre>\n";
36 36
 
37 37
 // create client and message objects
38 38
 $req = new PhpXmlRpc\Request('examples.sortByAge', array($v));
@@ -52,15 +52,15 @@  discard block
 block discarded – undo
52 52
     foreach ($value as $struct) {
53 53
         $name = $struct["name"];
54 54
         $age = $struct["age"];
55
-        print htmlspecialchars($name->scalarval()) . ", " . htmlspecialchars($age->scalarval()) . "\n";
55
+        print htmlspecialchars($name->scalarval()).", ".htmlspecialchars($age->scalarval())."\n";
56 56
     }
57 57
 
58
-    print "<hr/>For nerds: I got this value back<br/><pre>" .
59
-        htmlentities($resp->serialize()) . "</pre><hr/>\n";
58
+    print "<hr/>For nerds: I got this value back<br/><pre>".
59
+        htmlentities($resp->serialize())."</pre><hr/>\n";
60 60
 } else {
61 61
     print "An error occurred:<pre>";
62
-    print "Code: " . htmlspecialchars($resp->faultCode()) .
63
-        "\nReason: '" . htmlspecialchars($resp->faultString()) . '\'</pre><hr/>';
62
+    print "Code: ".htmlspecialchars($resp->faultCode()).
63
+        "\nReason: '".htmlspecialchars($resp->faultString()).'\'</pre><hr/>';
64 64
 }
65 65
 
66 66
 ?>
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.