Completed
Push — master ( 509dee...ac735c )
by Gaetano
03:01
created
tests/parse_args.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
             if (isset($argv)) {
42 42
                 foreach ($argv as $param) {
43 43
                     $param = explode('=', $param);
44
-                    if (count($param) > 1) {
44
+                    if (count($param)>1) {
45 45
                         $pname = strtoupper(ltrim($param[0], '-'));
46 46
                         $$pname = $param[1];
47 47
                     }
@@ -72,18 +72,18 @@  discard block
 block discarded – undo
72 72
             $args['HTTPSURI'] = $HTTPSURI;
73 73
         }
74 74
         if (isset($HTTPSIGNOREPEER)) {
75
-            $args['HTTPSIGNOREPEER'] = (bool)$HTTPSIGNOREPEER;
75
+            $args['HTTPSIGNOREPEER'] = (bool) $HTTPSIGNOREPEER;
76 76
         }
77 77
         if (isset($HTTPSVERIFYHOST)) {
78
-            $args['HTTPSVERIFYHOST'] = (int)$HTTPSVERIFYHOST;
78
+            $args['HTTPSVERIFYHOST'] = (int) $HTTPSVERIFYHOST;
79 79
         }
80 80
         if (isset($SSLVERSION)) {
81
-            $args['SSLVERSION'] = (int)$SSLVERSION;
81
+            $args['SSLVERSION'] = (int) $SSLVERSION;
82 82
         }
83 83
         if (isset($PROXY)) {
84 84
             $arr = explode(':', $PROXY);
85 85
             $args['PROXYSERVER'] = $arr[0];
86
-            if (count($arr) > 1) {
86
+            if (count($arr)>1) {
87 87
                 $args['PROXYPORT'] = $arr[1];
88 88
             } else {
89 89
                 $args['PROXYPORT'] = 8080;
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             }
113 113
         }
114 114
         if ($URI[0] != '/') {
115
-            $URI = '/' . $URI;
115
+            $URI = '/'.$URI;
116 116
         }
117 117
         $args['URI'] = $URI;
118 118
         if (isset($LOCALPATH)) {
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 server.php
12 12
 $GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY'] = '/tmp/phpxmlrpc_coverage';
Please login to merge, or discard this patch.
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/introspect.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -6,20 +6,20 @@  discard block
 block discarded – undo
6 6
 <h3>The code demonstrates usage of multicall and introspection methods</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
 function display_error($r)
13 13
 {
14 14
     print "An error occurred: ";
15
-    print "Code: " . $r->faultCode()
16
-        . " Reason: '" . $r->faultString() . "'<br/>";
15
+    print "Code: ".$r->faultCode()
16
+        . " Reason: '".$r->faultString()."'<br/>";
17 17
 }
18 18
 
19 19
 $client = new PhpXmlRpc\Client("http://phpxmlrpc.sourceforge.net/server.php");
20 20
 
21 21
 // First off, let's retrieve the list of methods available on the remote server
22
-print "<h3>methods available at http://" . $client->server . $client->path . "</h3>\n";
22
+print "<h3>methods available at http://".$client->server.$client->path."</h3>\n";
23 23
 $req = new PhpXmlRpc\Request('system.listMethods');
24 24
 $resp = $client->send($req);
25 25
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
     // Then, retrieve the signature and help text of each available method
32 32
     foreach ($v as $methodName) {
33
-        print "<h4>" . $methodName->scalarval() . "</h4>\n";
33
+        print "<h4>".$methodName->scalarval()."</h4>\n";
34 34
         // build messages first, add params later
35 35
         $m1 = new PhpXmlRpc\Request('system.methodHelp');
36 36
         $m2 = new PhpXmlRpc\Request('system.methodSignature');
@@ -61,13 +61,13 @@  discard block
 block discarded – undo
61 61
             if ($val->kindOf() == "array") {
62 62
                 foreach ($val as $x) {
63 63
                     $ret = $x[0];
64
-                    print "<code>" . $ret->scalarval() . " "
65
-                        . $methodName->scalarval() . "(";
66
-                    if ($x->count() > 1) {
67
-                        for ($k = 1; $k < $x->count(); $k++) {
64
+                    print "<code>".$ret->scalarval()." "
65
+                        . $methodName->scalarval()."(";
66
+                    if ($x->count()>1) {
67
+                        for ($k = 1; $k<$x->count(); $k++) {
68 68
                             $y = $x[$k];
69 69
                             print $y->scalarval();
70
-                            if ($k < $x->count() - 1) {
70
+                            if ($k<$x->count()-1) {
71 71
                                 print ", ";
72 72
                             }
73 73
                         }
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.