@@ -1,10 +1,10 @@ discard block |
||
| 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 | -include_once __DIR__ . '/PolyfillTestCase.php'; |
|
| 7 | +include_once __DIR__.'/PolyfillTestCase.php'; |
|
| 8 | 8 | |
| 9 | 9 | /** |
| 10 | 10 | * Tests involving requests sent to non-existing servers |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | // make sure there's no freaking catchall DNS in effect |
| 58 | 58 | $dnsinfo = dns_get_record($this->client->server); |
| 59 | 59 | if ($dnsinfo) { |
| 60 | - $this->markTestSkipped('Seems like there is a catchall DNS in effect: host ' . $this->client->server . ' found'); |
|
| 60 | + $this->markTestSkipped('Seems like there is a catchall DNS in effect: host '.$this->client->server.' found'); |
|
| 61 | 61 | } else { |
| 62 | 62 | $this->assertEquals(5, $r->faultCode()); |
| 63 | 63 | } |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | // now test a successful connection |
| 84 | 84 | $server = explode(':', $this->args['HTTPSERVER']); |
| 85 | - if (count($server) > 1) { |
|
| 85 | + if (count($server)>1) { |
|
| 86 | 86 | $this->client->port = $server[1]; |
| 87 | 87 | } |
| 88 | 88 | $this->client->server = $server[0]; |
@@ -22,14 +22,16 @@ |
||
| 22 | 22 | $this->client = new xmlrpc_client('/NOTEXIST.php', $this->args['HTTPSERVER'], 80); |
| 23 | 23 | $this->client->setDebug($this->args['DEBUG']); |
| 24 | 24 | |
| 25 | - if ($this->args['DEBUG'] == 1) |
|
| 26 | - ob_start(); |
|
| 25 | + if ($this->args['DEBUG'] == 1) { |
|
| 26 | + ob_start(); |
|
| 27 | + } |
|
| 27 | 28 | } |
| 28 | 29 | |
| 29 | 30 | protected function tear_down() |
| 30 | 31 | { |
| 31 | - if ($this->args['DEBUG'] != 1) |
|
| 32 | - return; |
|
| 32 | + if ($this->args['DEBUG'] != 1) { |
|
| 33 | + return; |
|
| 34 | + } |
|
| 33 | 35 | $out = ob_get_clean(); |
| 34 | 36 | $status = $this->getStatus(); |
| 35 | 37 | if ($status == PHPUnit_Runner_BaseTestRunner::STATUS_ERROR |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | // check for command line (env vars) vs. web page input params |
| 45 | 45 | if (!isset($_SERVER['REQUEST_METHOD'])) { |
| 46 | - foreach($_SERVER as $key => $val) { |
|
| 46 | + foreach ($_SERVER as $key => $val) { |
|
| 47 | 47 | if (array_key_exists($key, $args)) { |
| 48 | 48 | $$key = $val; |
| 49 | 49 | } |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | } |
| 88 | 88 | } |
| 89 | 89 | if ($HTTPURI[0] != '/') { |
| 90 | - $HTTPURI = '/' . $HTTPURI; |
|
| 90 | + $HTTPURI = '/'.$HTTPURI; |
|
| 91 | 91 | } |
| 92 | 92 | $args['HTTPURI'] = $HTTPURI; |
| 93 | 93 | |
@@ -101,21 +101,21 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | if (isset($HTTPSIGNOREPEER)) { |
| 104 | - $args['HTTPSIGNOREPEER'] = (bool)$HTTPSIGNOREPEER; |
|
| 104 | + $args['HTTPSIGNOREPEER'] = (bool) $HTTPSIGNOREPEER; |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | if (isset($HTTPSVERIFYHOST)) { |
| 108 | - $args['HTTPSVERIFYHOST'] = (int)$HTTPSVERIFYHOST; |
|
| 108 | + $args['HTTPSVERIFYHOST'] = (int) $HTTPSVERIFYHOST; |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | if (isset($SSLVERSION)) { |
| 112 | - $args['SSLVERSION'] = (int)$SSLVERSION; |
|
| 112 | + $args['SSLVERSION'] = (int) $SSLVERSION; |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | if (isset($PROXYSERVER)) { |
| 116 | 116 | $arr = explode(':', $PROXYSERVER); |
| 117 | 117 | $args['PROXYSERVER'] = $arr[0]; |
| 118 | - if (count($arr) > 1) { |
|
| 118 | + if (count($arr)>1) { |
|
| 119 | 119 | $args['PROXYPORT'] = $arr[1]; |
| 120 | 120 | } else { |
| 121 | 121 | $args['PROXYPORT'] = 8080; |
@@ -1,6 +1,6 @@ discard block |
||
| 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 |
||
| 11 | 11 | { |
| 12 | 12 | $this->args = argParser::getArgs(); |
| 13 | 13 | |
| 14 | - $this->baseUrl = $this->args['HTTPSERVER'] . str_replace( '/demo/server/server.php', '/tests/', $this->args['HTTPURI'] ); |
|
| 14 | + $this->baseUrl = $this->args['HTTPSERVER'].str_replace('/demo/server/server.php', '/tests/', $this->args['HTTPURI']); |
|
| 15 | 15 | |
| 16 | - $this->coverageScriptUrl = 'http://' . $this->args['HTTPSERVER'] . '/' . str_replace( '/demo/server/server.php', 'tests/phpunit_coverage.php', $this->args['HTTPURI'] ); |
|
| 16 | + $this->coverageScriptUrl = 'http://'.$this->args['HTTPSERVER'].'/'.str_replace('/demo/server/server.php', 'tests/phpunit_coverage.php', $this->args['HTTPURI']); |
|
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | public function testVerifyCompat() |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -include_once __DIR__ . '/LocalFileTestCase.php'; |
|
| 3 | +include_once __DIR__.'/LocalFileTestCase.php'; |
|
| 4 | 4 | |
| 5 | 5 | class DebuggerTest extends PhpXmlRpc_LocalFileTestCase |
| 6 | 6 | { |
@@ -8,9 +8,9 @@ discard block |
||
| 8 | 8 | { |
| 9 | 9 | $this->args = argParser::getArgs(); |
| 10 | 10 | |
| 11 | - $this->baseUrl = $this->args['HTTPSERVER'] . str_replace( '/demo/server/server.php', '/debugger/', $this->args['HTTPURI'] ); |
|
| 11 | + $this->baseUrl = $this->args['HTTPSERVER'].str_replace('/demo/server/server.php', '/debugger/', $this->args['HTTPURI']); |
|
| 12 | 12 | |
| 13 | - $this->coverageScriptUrl = 'http://' . $this->args['HTTPSERVER'] . '/' . str_replace( '/demo/server/server.php', 'tests/phpunit_coverage.php', $this->args['HTTPURI'] ); |
|
| 13 | + $this->coverageScriptUrl = 'http://'.$this->args['HTTPSERVER'].'/'.str_replace('/demo/server/server.php', 'tests/phpunit_coverage.php', $this->args['HTTPURI']); |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | public function testIndex() |
@@ -1,6 +1,6 @@ discard block |
||
| 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 |
||
| 11 | 11 | { |
| 12 | 12 | $this->args = argParser::getArgs(); |
| 13 | 13 | |
| 14 | - $this->baseUrl = $this->args['HTTPSERVER'] . str_replace( '/demo/server/server.php', '/demo/', $this->args['HTTPURI'] ); |
|
| 14 | + $this->baseUrl = $this->args['HTTPSERVER'].str_replace('/demo/server/server.php', '/demo/', $this->args['HTTPURI']); |
|
| 15 | 15 | |
| 16 | - $this->coverageScriptUrl = 'http://' . $this->args['HTTPSERVER'] . '/' . str_replace( '/demo/server/server.php', 'tests/phpunit_coverage.php', $this->args['HTTPURI'] ); |
|
| 16 | + $this->coverageScriptUrl = 'http://'.$this->args['HTTPSERVER'].'/'.str_replace('/demo/server/server.php', 'tests/phpunit_coverage.php', $this->args['HTTPURI']); |
|
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | public function testAgeSort() |
@@ -1,11 +1,11 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -include_once __DIR__ . '/../lib/xmlrpc.inc'; |
|
| 4 | -include_once __DIR__ . '/../lib/xmlrpc_wrappers.inc'; |
|
| 3 | +include_once __DIR__.'/../lib/xmlrpc.inc'; |
|
| 4 | +include_once __DIR__.'/../lib/xmlrpc_wrappers.inc'; |
|
| 5 | 5 | |
| 6 | -include_once __DIR__ . '/parse_args.php'; |
|
| 6 | +include_once __DIR__.'/parse_args.php'; |
|
| 7 | 7 | |
| 8 | -include_once __DIR__ . '/PolyfillTestCase.php'; |
|
| 8 | +include_once __DIR__.'/PolyfillTestCase.php'; |
|
| 9 | 9 | |
| 10 | 10 | use PHPUnit\Framework\TestResult; |
| 11 | 11 | |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | // (but only if not called from subclass objects / multitests) |
| 37 | 37 | if (function_exists('debug_backtrace') && strtolower(get_called_class()) == 'localhosttests') { |
| 38 | 38 | $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); |
| 39 | - for ($i = 0; $i < count($trace); $i++) { |
|
| 39 | + for ($i = 0; $i<count($trace); $i++) { |
|
| 40 | 40 | if (strpos($trace[$i]['function'], 'test') === 0) { |
| 41 | 41 | self::$failed_tests[$trace[$i]['function']] = true; |
| 42 | 42 | break; |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | public function _run($result = NULL) |
| 59 | 59 | { |
| 60 | - $this->testId = get_class($this) . '__' . $this->getName(); |
|
| 60 | + $this->testId = get_class($this).'__'.$this->getName(); |
|
| 61 | 61 | |
| 62 | 62 | if ($result === NULL) { |
| 63 | 63 | $result = $this->createResult(); |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | $this->args = argParser::getArgs(); |
| 89 | 89 | |
| 90 | 90 | $server = explode(':', $this->args['HTTPSERVER']); |
| 91 | - if (count($server) > 1) { |
|
| 91 | + if (count($server)>1) { |
|
| 92 | 92 | $this->client = new xmlrpc_client($this->args['HTTPURI'], $server[0], $server[1]); |
| 93 | 93 | } else { |
| 94 | 94 | $this->client = new xmlrpc_client($this->args['HTTPURI'], $this->args['HTTPSERVER']); |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $this->client->request_compression = $this->request_compression; |
| 99 | 99 | $this->client->accepted_compression = $this->accepted_compression; |
| 100 | 100 | |
| 101 | - $this->coverageScriptUrl = 'http://' . $this->args['HTTPSERVER'] . '/' . str_replace( '/demo/server/server.php', 'tests/phpunit_coverage.php', $this->args['HTTPURI'] ); |
|
| 101 | + $this->coverageScriptUrl = 'http://'.$this->args['HTTPSERVER'].'/'.str_replace('/demo/server/server.php', 'tests/phpunit_coverage.php', $this->args['HTTPURI']); |
|
| 102 | 102 | |
| 103 | 103 | if ($this->args['DEBUG'] == 1) |
| 104 | 104 | ob_start(); |
@@ -134,9 +134,9 @@ discard block |
||
| 134 | 134 | return $r; |
| 135 | 135 | } |
| 136 | 136 | if (is_array($errorCode)) { |
| 137 | - $this->assertContains($r->faultCode(), $errorCode, 'Error ' . $r->faultCode() . ' connecting to server: ' . $r->faultString()); |
|
| 137 | + $this->assertContains($r->faultCode(), $errorCode, 'Error '.$r->faultCode().' connecting to server: '.$r->faultString()); |
|
| 138 | 138 | } else { |
| 139 | - $this->assertEquals($errorCode, $r->faultCode(), 'Error ' . $r->faultCode() . ' connecting to server: ' . $r->faultString()); |
|
| 139 | + $this->assertEquals($errorCode, $r->faultCode(), 'Error '.$r->faultCode().' connecting to server: '.$r->faultString()); |
|
| 140 | 140 | } |
| 141 | 141 | if (!$r->faultCode()) { |
| 142 | 142 | if ($returnResponse) { |
@@ -158,20 +158,20 @@ discard block |
||
| 158 | 158 | $query = parse_url($this->client->path, PHP_URL_QUERY); |
| 159 | 159 | parse_str($query, $vars); |
| 160 | 160 | $query = http_build_query(array_merge($vars, $data)); |
| 161 | - $this->client->path = parse_url($this->client->path, PHP_URL_PATH) . '?' . $query; |
|
| 161 | + $this->client->path = parse_url($this->client->path, PHP_URL_PATH).'?'.$query; |
|
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | public function testString() |
| 165 | 165 | { |
| 166 | - $sendString = "here are 3 \"entities\": < > & " . |
|
| 167 | - "and here's a dollar sign: \$pretendvarname and a backslash too: " . chr(92) . |
|
| 168 | - " - isn't that great? \\\"hackery\\\" at it's best " . |
|
| 169 | - " also don't want to miss out on \$item[0]. " . |
|
| 170 | - "The real weird stuff follows: CRLF here" . chr(13) . chr(10) . |
|
| 171 | - "a simple CR here" . chr(13) . |
|
| 172 | - "a simple LF here" . chr(10) . |
|
| 173 | - "and then LFCR" . chr(10) . chr(13) . |
|
| 174 | - "last but not least weird names: G" . chr(252) . "nter, El" . chr(232) . "ne, and an xml comment closing tag: -->"; |
|
| 166 | + $sendString = "here are 3 \"entities\": < > & ". |
|
| 167 | + "and here's a dollar sign: \$pretendvarname and a backslash too: ".chr(92). |
|
| 168 | + " - isn't that great? \\\"hackery\\\" at it's best ". |
|
| 169 | + " also don't want to miss out on \$item[0]. ". |
|
| 170 | + "The real weird stuff follows: CRLF here".chr(13).chr(10). |
|
| 171 | + "a simple CR here".chr(13). |
|
| 172 | + "a simple LF here".chr(10). |
|
| 173 | + "and then LFCR".chr(10).chr(13). |
|
| 174 | + "last but not least weird names: G".chr(252)."nter, El".chr(232)."ne, and an xml comment closing tag: -->"; |
|
| 175 | 175 | $m = new xmlrpcmsg('examples.stringecho', array( |
| 176 | 176 | new xmlrpcval($sendString, 'string'), |
| 177 | 177 | )); |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | public function testLatin1String() |
| 193 | 193 | { |
| 194 | 194 | $sendString = |
| 195 | - "last but not least weird names: G" . chr(252) . "nter, El" . chr(232) . "ne"; |
|
| 195 | + "last but not least weird names: G".chr(252)."nter, El".chr(232)."ne"; |
|
| 196 | 196 | $x = '<?xml version="1.0" encoding="ISO-8859-1"?><methodCall><methodName>examples.stringecho</methodName><params><param><value>'. |
| 197 | 197 | $sendString. |
| 198 | 198 | '</value></param></params></methodCall>'; |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | public function testUtf8Method() |
| 297 | 297 | { |
| 298 | 298 | PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding = 'UTF-8'; |
| 299 | - $m = new xmlrpcmsg("tests.utf8methodname." . 'κόσμε', array( |
|
| 299 | + $m = new xmlrpcmsg("tests.utf8methodname.".'κόσμε', array( |
|
| 300 | 300 | new xmlrpcval('hello') |
| 301 | 301 | )); |
| 302 | 302 | $v = $this->send($m); |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | )); |
| 319 | 319 | $v = $this->send($m); |
| 320 | 320 | if ($v) { |
| 321 | - $this->assertEquals($a + $b, $v->scalarval()); |
|
| 321 | + $this->assertEquals($a+$b, $v->scalarval()); |
|
| 322 | 322 | } |
| 323 | 323 | } |
| 324 | 324 | |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | )); |
| 331 | 331 | $v = $this->send($m); |
| 332 | 332 | if ($v) { |
| 333 | - $this->assertEquals(12 - 23, $v->scalarval()); |
|
| 333 | + $this->assertEquals(12-23, $v->scalarval()); |
|
| 334 | 334 | } |
| 335 | 335 | } |
| 336 | 336 | |
@@ -364,7 +364,7 @@ discard block |
||
| 364 | 364 | if ($v) { |
| 365 | 365 | $sz = $v->arraysize(); |
| 366 | 366 | $got = ''; |
| 367 | - for ($i = 0; $i < $sz; $i++) { |
|
| 367 | + for ($i = 0; $i<$sz; $i++) { |
|
| 368 | 368 | $b = $v->arraymem($i); |
| 369 | 369 | if ($b->scalarval()) { |
| 370 | 370 | $got .= '1'; |
@@ -427,7 +427,7 @@ discard block |
||
| 427 | 427 | $got = ''; |
| 428 | 428 | $expected = '37210'; |
| 429 | 429 | $expect_array = array('ctLeftAngleBrackets', 'ctRightAngleBrackets', 'ctAmpersands', 'ctApostrophes', 'ctQuotes'); |
| 430 | - foreach($expect_array as $val) { |
|
| 430 | + foreach ($expect_array as $val) { |
|
| 431 | 431 | $b = $v->structmem($val); |
| 432 | 432 | $got .= $b->me['int']; |
| 433 | 433 | } |
@@ -856,7 +856,7 @@ discard block |
||
| 856 | 856 | { |
| 857 | 857 | // make a 'deep client copy' as the original one might have many properties set |
| 858 | 858 | // also for speed only wrap one method of the whole server |
| 859 | - $class = wrap_xmlrpc_server($this->client, array('simple_client_copy' => 0, 'method_filter' => '/examples\.getStateName/' )); |
|
| 859 | + $class = wrap_xmlrpc_server($this->client, array('simple_client_copy' => 0, 'method_filter' => '/examples\.getStateName/')); |
|
| 860 | 860 | if ($class == '') { |
| 861 | 861 | $this->fail('Registration of remote server failed'); |
| 862 | 862 | } else { |
@@ -895,9 +895,9 @@ discard block |
||
| 895 | 895 | $cookies = array( |
| 896 | 896 | //'c1' => array(), |
| 897 | 897 | 'c2' => array('value' => 'c2'), |
| 898 | - 'c3' => array('value' => 'c3', 'expires' => time() + 60 * 60 * 24 * 30), |
|
| 899 | - 'c4' => array('value' => 'c4', 'expires' => time() + 60 * 60 * 24 * 30, 'path' => '/'), |
|
| 900 | - 'c5' => array('value' => 'c5', 'expires' => time() + 60 * 60 * 24 * 30, 'path' => '/', 'domain' => 'localhost'), |
|
| 898 | + 'c3' => array('value' => 'c3', 'expires' => time()+60 * 60 * 24 * 30), |
|
| 899 | + 'c4' => array('value' => 'c4', 'expires' => time()+60 * 60 * 24 * 30, 'path' => '/'), |
|
| 900 | + 'c5' => array('value' => 'c5', 'expires' => time()+60 * 60 * 24 * 30, 'path' => '/', 'domain' => 'localhost'), |
|
| 901 | 901 | ); |
| 902 | 902 | $cookiesval = php_xmlrpc_encode($cookies); |
| 903 | 903 | $m = new xmlrpcmsg('examples.setcookies', array($cookiesval)); |
@@ -945,10 +945,10 @@ discard block |
||
| 945 | 945 | $m = new xmlrpcmsg('examples.getcookies', array()); |
| 946 | 946 | foreach ($cookies as $cookie => $val) { |
| 947 | 947 | $this->client->setCookie($cookie, $val); |
| 948 | - $cookies[$cookie] = (string)$cookies[$cookie]; |
|
| 948 | + $cookies[$cookie] = (string) $cookies[$cookie]; |
|
| 949 | 949 | } |
| 950 | 950 | $r = $this->client->send($m, $this->timeout, $this->method); |
| 951 | - $this->assertEquals(0, $r->faultCode(), 'Error ' . $r->faultCode() . ' connecting to server: ' . $r->faultString()); |
|
| 951 | + $this->assertEquals(0, $r->faultCode(), 'Error '.$r->faultCode().' connecting to server: '.$r->faultString()); |
|
| 952 | 952 | if (!$r->faultCode()) { |
| 953 | 953 | $v = $r->value(); |
| 954 | 954 | $v = php_xmlrpc_decode($v); |
@@ -100,14 +100,16 @@ |
||
| 100 | 100 | |
| 101 | 101 | $this->coverageScriptUrl = 'http://' . $this->args['HTTPSERVER'] . '/' . str_replace( '/demo/server/server.php', 'tests/phpunit_coverage.php', $this->args['HTTPURI'] ); |
| 102 | 102 | |
| 103 | - if ($this->args['DEBUG'] == 1) |
|
| 104 | - ob_start(); |
|
| 103 | + if ($this->args['DEBUG'] == 1) { |
|
| 104 | + ob_start(); |
|
| 105 | + } |
|
| 105 | 106 | } |
| 106 | 107 | |
| 107 | 108 | protected function tear_down() |
| 108 | 109 | { |
| 109 | - if ($this->args['DEBUG'] != 1) |
|
| 110 | - return; |
|
| 110 | + if ($this->args['DEBUG'] != 1) { |
|
| 111 | + return; |
|
| 112 | + } |
|
| 111 | 113 | $out = ob_get_clean(); |
| 112 | 114 | $status = $this->getStatus(); |
| 113 | 115 | if ($status == PHPUnit_Runner_BaseTestRunner::STATUS_ERROR |
@@ -19,9 +19,9 @@ discard block |
||
| 19 | 19 | use PhpXmlRpc\Response; |
| 20 | 20 | use PhpXmlRpc\Encoder; |
| 21 | 21 | |
| 22 | -include_once __DIR__ . '/../vendor/autoload.php'; |
|
| 22 | +include_once __DIR__.'/../vendor/autoload.php'; |
|
| 23 | 23 | |
| 24 | -include __DIR__ . '/parse_args.php'; |
|
| 24 | +include __DIR__.'/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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -207,15 +207,15 @@ discard block |
||
| 207 | 207 | $value = $encoder->encode($data1, array('auto_dates')); |
| 208 | 208 | $req = new Request('interopEchoTests.echoValue', array($value)); |
| 209 | 209 | $reqs = array(); |
| 210 | - for ($i = 0; $i < $num_tests; $i++) { |
|
| 210 | + for ($i = 0; $i<$num_tests; $i++) { |
|
| 211 | 211 | $reqs[] = $req; |
| 212 | 212 | } |
| 213 | 213 | $server = explode(':', $args['HTTPSERVER']); |
| 214 | - if (count($server) > 1) { |
|
| 215 | - $srv = $server[1] . '://' . $server[0] . $args['HTTPURI']; |
|
| 214 | + if (count($server)>1) { |
|
| 215 | + $srv = $server[1].'://'.$server[0].$args['HTTPURI']; |
|
| 216 | 216 | $c = new Client($args['HTTPURI'], $server[0], $server[1]); |
| 217 | 217 | } else { |
| 218 | - $srv = $args['HTTPSERVER'] . $args['HTTPURI']; |
|
| 218 | + $srv = $args['HTTPSERVER'].$args['HTTPURI']; |
|
| 219 | 219 | $c = new Client($args['HTTPURI'], $args['HTTPSERVER']); |
| 220 | 220 | } |
| 221 | 221 | // do not interfere with http compression |
@@ -229,7 +229,7 @@ discard block |
||
| 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 | } |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | if (function_exists('curl_init')) { |
| 239 | 239 | begin_test($testName, 'http 11 w. keep-alive'); |
| 240 | 240 | $response = array(); |
| 241 | - for ($i = 0; $i < $num_tests; $i++) { |
|
| 241 | + for ($i = 0; $i<$num_tests; $i++) { |
|
| 242 | 242 | $resp = $c->send($req, 10, 'http11'); |
| 243 | 243 | $response[] = $resp->value(); |
| 244 | 244 | } |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | $c->keepalive = false; |
| 248 | 248 | begin_test($testName, 'http 11'); |
| 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 | } |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | |
| 268 | 268 | begin_test($testName, 'http 10 w. compression'); |
| 269 | 269 | $response = array(); |
| 270 | - for ($i = 0; $i < $num_tests; $i++) { |
|
| 270 | + for ($i = 0; $i<$num_tests; $i++) { |
|
| 271 | 271 | $resp = $c->send($req); |
| 272 | 272 | $response[] = $resp->value(); |
| 273 | 273 | } |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | if (function_exists('curl_init')) { |
| 277 | 277 | begin_test($testName, 'http 11 w. keep-alive and compression'); |
| 278 | 278 | $response = array(); |
| 279 | - for ($i = 0; $i < $num_tests; $i++) { |
|
| 279 | + for ($i = 0; $i<$num_tests; $i++) { |
|
| 280 | 280 | $resp = $c->send($req, 10, 'http11'); |
| 281 | 281 | $response[] = $resp->value(); |
| 282 | 282 | } |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | $c->keepalive = false; |
| 286 | 286 | begin_test($testName, 'http 11 w. compression'); |
| 287 | 287 | $response = array(); |
| 288 | - for ($i = 0; $i < $num_tests; $i++) { |
|
| 288 | + for ($i = 0; $i<$num_tests; $i++) { |
|
| 289 | 289 | $resp = $c->send($req, 10, 'http11'); |
| 290 | 290 | $response[] = $resp->value(); |
| 291 | 291 | } |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | foreach ($test_results as $test => $results) { |
| 307 | 307 | echo "\nTEST: $test\n"; |
| 308 | 308 | foreach ($results as $case => $data) { |
| 309 | - echo " $case: {$data['time']} secs - Output data CRC: " . crc32(serialize($data['result'])) . "\n"; |
|
| 309 | + echo " $case: {$data['time']} secs - Output data CRC: ".crc32(serialize($data['result']))."\n"; |
|
| 310 | 310 | } |
| 311 | 311 | } |
| 312 | 312 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -require_once __DIR__ . "/_prepend.php"; |
|
| 3 | +require_once __DIR__."/_prepend.php"; |
|
| 4 | 4 | |
| 5 | 5 | use PhpXmlRpc\Value; |
| 6 | 6 | |
@@ -31,8 +31,8 @@ discard block |
||
| 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 |
||
| 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 |
@@ -101,4 +101,4 @@ discard block |
||
| 101 | 101 | ), |
| 102 | 102 | )); |
| 103 | 103 | |
| 104 | -require_once __DIR__ . "/_append.php"; |
|
| 104 | +require_once __DIR__."/_append.php"; |
|
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | * Please do not copy this file verbatim into your production server. |
| 10 | 10 | **/ |
| 11 | 11 | |
| 12 | -require_once __DIR__ . "/_prepend.php"; |
|
| 12 | +require_once __DIR__."/_prepend.php"; |
|
| 13 | 13 | |
| 14 | 14 | use PhpXmlRpc\Value; |
| 15 | 15 | |
@@ -105,11 +105,11 @@ discard block |
||
| 105 | 105 | // extract the value of the state number |
| 106 | 106 | $snv = $sno->scalarval(); |
| 107 | 107 | // look it up in our array (zero-based) |
| 108 | - if (isset($stateNames[$snv - 1])) { |
|
| 109 | - $stateName = $stateNames[$snv - 1]; |
|
| 108 | + if (isset($stateNames[$snv-1])) { |
|
| 109 | + $stateName = $stateNames[$snv-1]; |
|
| 110 | 110 | } else { |
| 111 | 111 | // not there, so complain |
| 112 | - $err = "I don't have a state for the index '" . $snv . "'"; |
|
| 112 | + $err = "I don't have a state for the index '".$snv."'"; |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | // if we generated an error, create an error return response |
@@ -135,11 +135,11 @@ discard block |
||
| 135 | 135 | { |
| 136 | 136 | global $stateNames; |
| 137 | 137 | |
| 138 | - if (isset($stateNames[$stateNo - 1])) { |
|
| 139 | - return $stateNames[$stateNo - 1]; |
|
| 138 | + if (isset($stateNames[$stateNo-1])) { |
|
| 139 | + return $stateNames[$stateNo-1]; |
|
| 140 | 140 | } else { |
| 141 | 141 | // not, there so complain |
| 142 | - throw new Exception("I don't have a state for the index '" . $stateNo . "'", PhpXmlRpc\PhpXmlRpc::$xmlrpcerruser); |
|
| 142 | + throw new Exception("I don't have a state for the index '".$stateNo."'", PhpXmlRpc\PhpXmlRpc::$xmlrpcerruser); |
|
| 143 | 143 | } |
| 144 | 144 | } |
| 145 | 145 | |
@@ -169,17 +169,17 @@ discard block |
||
| 169 | 169 | eval($findstate9_sig['source']); |
| 170 | 170 | |
| 171 | 171 | $findstate10_sig = array( |
| 172 | - "function" => function ($req) { return findState($req); }, |
|
| 172 | + "function" => function($req) { return findState($req); }, |
|
| 173 | 173 | "signature" => $findstate_sig, |
| 174 | 174 | "docstring" => $findstate_doc, |
| 175 | 175 | ); |
| 176 | 176 | |
| 177 | -$findstate11_sig = $wrapper->wrapPhpFunction(function ($stateNo) { return inner_findstate($stateNo); }); |
|
| 177 | +$findstate11_sig = $wrapper->wrapPhpFunction(function($stateNo) { return inner_findstate($stateNo); }); |
|
| 178 | 178 | |
| 179 | 179 | $c = new xmlrpcServerMethodsContainer; |
| 180 | 180 | $moreSignatures = $wrapper->wrapPhpClass($c, array('prefix' => 'tests.', 'method_type' => 'all')); |
| 181 | 181 | |
| 182 | -$returnObj_sig = $wrapper->wrapPhpFunction(array($c, 'returnObject'), '', array('encode_php_objs' => true)); |
|
| 182 | +$returnObj_sig = $wrapper->wrapPhpFunction(array($c, 'returnObject'), '', array('encode_php_objs' => true)); |
|
| 183 | 183 | |
| 184 | 184 | // used to test signatures with NULL params |
| 185 | 185 | $findstate12_sig = array( |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | $s = $req->getParam(0); |
| 206 | 206 | $t = $req->getParam(1); |
| 207 | 207 | |
| 208 | - return new PhpXmlRpc\Response(new Value($s->scalarval() + $t->scalarval(), Value::$xmlrpcInt)); |
|
| 208 | + return new PhpXmlRpc\Response(new Value($s->scalarval()+$t->scalarval(), Value::$xmlrpcInt)); |
|
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | $addtwodouble_sig = array(array(Value::$xmlrpcDouble, Value::$xmlrpcDouble, Value::$xmlrpcDouble)); |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | $s = $req->getParam(0); |
| 216 | 216 | $t = $req->getParam(1); |
| 217 | 217 | |
| 218 | - return new PhpXmlRpc\Response(new Value($s->scalarval() + $t->scalarval(), Value::$xmlrpcDouble)); |
|
| 218 | + return new PhpXmlRpc\Response(new Value($s->scalarval()+$t->scalarval(), Value::$xmlrpcDouble)); |
|
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | $stringecho_sig = array(array(Value::$xmlrpcString, Value::$xmlrpcString)); |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | function echoBack($req) |
| 232 | 232 | { |
| 233 | 233 | // just sends back a string with what i got sent to me, just escaped, that's all |
| 234 | - $s = "I got the following message:\n" . $req->serialize(); |
|
| 234 | + $s = "I got the following message:\n".$req->serialize(); |
|
| 235 | 235 | |
| 236 | 236 | return new PhpXmlRpc\Response(new Value($s)); |
| 237 | 237 | } |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | return 0; |
| 289 | 289 | } |
| 290 | 290 | |
| 291 | - return ($agesorter_arr[$a] > $agesorter_arr[$b]) ? -1 : 1; |
|
| 291 | + return ($agesorter_arr[$a]>$agesorter_arr[$b]) ? -1 : 1; |
|
| 292 | 292 | } |
| 293 | 293 | |
| 294 | 294 | $agesorter_sig = array(array(Value::$xmlrpcArray, Value::$xmlrpcArray)); |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | // hack, must make global as uksort() won't |
| 335 | 335 | // allow us to pass any other auxiliary information |
| 336 | 336 | uksort($agesorter_arr, 'agesorter_compare'); |
| 337 | - foreach($agesorter_arr as $key => $val) { |
|
| 337 | + foreach ($agesorter_arr as $key => $val) { |
|
| 338 | 338 | // recreate each struct element |
| 339 | 339 | $v[] = new Value( |
| 340 | 340 | array( |
@@ -389,17 +389,17 @@ discard block |
||
| 389 | 389 | $err = "Error, no 'From' field specified"; |
| 390 | 390 | } |
| 391 | 391 | |
| 392 | - $msgHdr = "From: " . $mFrom->scalarval() . "\n"; |
|
| 393 | - $msgHdr .= "To: " . $mTo->scalarval() . "\n"; |
|
| 392 | + $msgHdr = "From: ".$mFrom->scalarval()."\n"; |
|
| 393 | + $msgHdr .= "To: ".$mTo->scalarval()."\n"; |
|
| 394 | 394 | |
| 395 | 395 | if ($mCc->scalarval() != "") { |
| 396 | - $msgHdr .= "Cc: " . $mCc->scalarval() . "\n"; |
|
| 396 | + $msgHdr .= "Cc: ".$mCc->scalarval()."\n"; |
|
| 397 | 397 | } |
| 398 | 398 | if ($mBcc->scalarval() != "") { |
| 399 | - $msgHdr .= "Bcc: " . $mBcc->scalarval() . "\n"; |
|
| 399 | + $msgHdr .= "Bcc: ".$mBcc->scalarval()."\n"; |
|
| 400 | 400 | } |
| 401 | 401 | if ($mMime->scalarval() != "") { |
| 402 | - $msgHdr .= "Content-type: " . $mMime->scalarval() . "\n"; |
|
| 402 | + $msgHdr .= "Content-type: ".$mMime->scalarval()."\n"; |
|
| 403 | 403 | } |
| 404 | 404 | $msgHdr .= "X-Mailer: XML-RPC for PHP mailer 1.0"; |
| 405 | 405 | |
@@ -489,7 +489,7 @@ discard block |
||
| 489 | 489 | $moe = $sno["moe"]; |
| 490 | 490 | $larry = $sno["larry"]; |
| 491 | 491 | $curly = $sno["curly"]; |
| 492 | - $num = $moe->scalarval() + $larry->scalarval() + $curly->scalarval(); |
|
| 492 | + $num = $moe->scalarval()+$larry->scalarval()+$curly->scalarval(); |
|
| 493 | 493 | |
| 494 | 494 | return new PhpXmlRpc\Response(new Value($num, Value::$xmlrpcInt)); |
| 495 | 495 | } |
@@ -531,9 +531,9 @@ discard block |
||
| 531 | 531 | $ar = $req->getParam(0); |
| 532 | 532 | $sz = $ar->count(); |
| 533 | 533 | $first = $ar[0]; |
| 534 | - $last = $ar[$sz - 1]; |
|
| 534 | + $last = $ar[$sz-1]; |
|
| 535 | 535 | |
| 536 | - return new PhpXmlRpc\Response(new Value($first->scalarval() . |
|
| 536 | + return new PhpXmlRpc\Response(new Value($first->scalarval(). |
|
| 537 | 537 | $last->scalarval(), Value::$xmlrpcString)); |
| 538 | 538 | } |
| 539 | 539 | |
@@ -567,7 +567,7 @@ discard block |
||
| 567 | 567 | $larry = $fools["larry"]; |
| 568 | 568 | $moe = $fools["moe"]; |
| 569 | 569 | |
| 570 | - return new PhpXmlRpc\Response(new Value($curly->scalarval() + $larry->scalarval() + $moe->scalarval(), Value::$xmlrpcInt)); |
|
| 570 | + return new PhpXmlRpc\Response(new Value($curly->scalarval()+$larry->scalarval()+$moe->scalarval(), Value::$xmlrpcInt)); |
|
| 571 | 571 | } |
| 572 | 572 | |
| 573 | 573 | $v1_countTheEntities_sig = array(array(Value::$xmlrpcStruct, Value::$xmlrpcString)); |
@@ -581,7 +581,7 @@ discard block |
||
| 581 | 581 | $ap = 0; |
| 582 | 582 | $qu = 0; |
| 583 | 583 | $amp = 0; |
| 584 | - for ($i = 0; $i < strlen($str); $i++) { |
|
| 584 | + for ($i = 0; $i<strlen($str); $i++) { |
|
| 585 | 585 | $c = substr($str, $i, 1); |
| 586 | 586 | switch ($c) { |
| 587 | 587 | case ">": |
@@ -783,7 +783,7 @@ discard block |
||
| 783 | 783 | ), |
| 784 | 784 | // Greek word 'kosme'. NB: NOT a valid ISO8859 string! |
| 785 | 785 | // NB: we can only register this when setting internal encoding to UTF-8, or it will break system.listMethods |
| 786 | - "tests.utf8methodname." . 'κόσμε' => array( |
|
| 786 | + "tests.utf8methodname.".'κόσμε' => array( |
|
| 787 | 787 | "function" => "stringEcho", |
| 788 | 788 | "signature" => $stringecho_sig, |
| 789 | 789 | "docstring" => $stringecho_doc, |
@@ -976,4 +976,4 @@ discard block |
||
| 976 | 976 | $s->service(); |
| 977 | 977 | // That should do all we need! |
| 978 | 978 | |
| 979 | -require_once __DIR__ . "/_append.php"; |
|
| 979 | +require_once __DIR__."/_append.php"; |
|