@@ -41,10 +41,10 @@ discard block |
||
41 | 41 | * @param array $extraOptions |
42 | 42 | * @return array|false |
43 | 43 | */ |
44 | -function wrap_php_function($funcName, $newFuncName='', $extraOptions=array()) |
|
44 | +function wrap_php_function($funcName, $newFuncName = '', $extraOptions = array()) |
|
45 | 45 | { |
46 | 46 | $wrapper = new PhpXmlRpc\Wrapper(); |
47 | - if (!isset($extraOptions['return_source']) || $extraOptions['return_source'] == false) { |
|
47 | + if (!isset($extraOptions['return_source']) || $extraOptions['return_source'] == false) { |
|
48 | 48 | // backwards compat: return string instead of callable |
49 | 49 | $extraOptions['return_source'] = true; |
50 | 50 | $wrapped = $wrapper->wrapPhpFunction($funcName, $newFuncName, $extraOptions); |
@@ -64,17 +64,17 @@ discard block |
||
64 | 64 | * @param array $extraOptions |
65 | 65 | * @return array|false |
66 | 66 | */ |
67 | -function wrap_php_class($className, $extraOptions=array()) |
|
67 | +function wrap_php_class($className, $extraOptions = array()) |
|
68 | 68 | { |
69 | 69 | $wrapper = new PhpXmlRpc\Wrapper(); |
70 | 70 | $fix = false; |
71 | - if (!isset($extraOptions['return_source']) || $extraOptions['return_source'] == false) { |
|
71 | + if (!isset($extraOptions['return_source']) || $extraOptions['return_source'] == false) { |
|
72 | 72 | // backwards compat: return string instead of callable |
73 | 73 | $extraOptions['return_source'] = true; |
74 | 74 | $fix = true; |
75 | 75 | } |
76 | 76 | $wrapped = $wrapper->wrapPhpClass($className, $extraOptions); |
77 | - foreach($wrapped as $name => $value) { |
|
77 | + foreach ($wrapped as $name => $value) { |
|
78 | 78 | if ($fix) { |
79 | 79 | eval($value['source']); |
80 | 80 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | * @param string $newFuncName deprecated, use an option in $extraOptions |
94 | 94 | * @return array|callable|false |
95 | 95 | */ |
96 | -function wrap_xmlrpc_method($client, $methodName, $extraOptions=0, $timeout=0, $protocol='', $newFuncName='') |
|
96 | +function wrap_xmlrpc_method($client, $methodName, $extraOptions = 0, $timeout = 0, $protocol = '', $newFuncName = '') |
|
97 | 97 | { |
98 | 98 | if (!is_array($extraOptions)) |
99 | 99 | { |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | * @param array $extraOptions |
129 | 129 | * @return mixed |
130 | 130 | */ |
131 | -function wrap_xmlrpc_server($client, $extraOptions=array()) |
|
131 | +function wrap_xmlrpc_server($client, $extraOptions = array()) |
|
132 | 132 | { |
133 | 133 | $wrapper = new PhpXmlRpc\Wrapper(); |
134 | 134 | return $wrapper->wrapXmlrpcServer($client, $extraOptions); |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | $faultResponse = '', $namespace = '\\PhpXmlRpc\\') |
149 | 149 | { |
150 | 150 | $code = "function $xmlrpcFuncName ("; |
151 | - if ($clientCopyMode < 2) { |
|
151 | + if ($clientCopyMode<2) { |
|
152 | 152 | // client copy mode 0 or 1 == partial / full client copy in emitted code |
153 | 153 | $innerCode = build_client_wrapper_code($client, $clientCopyMode, $prefix); |
154 | 154 | $innerCode .= "\$client->setDebug(\$debug);\n"; |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | |
163 | 163 | if ($mDesc != '') { |
164 | 164 | // take care that PHP comment is not terminated unwillingly by method description |
165 | - $mDesc = "/**\n* " . str_replace('*/', '* /', $mDesc) . "\n"; |
|
165 | + $mDesc = "/**\n* ".str_replace('*/', '* /', $mDesc)."\n"; |
|
166 | 166 | } else { |
167 | 167 | $mDesc = "/**\nFunction $xmlrpcFuncName\n"; |
168 | 168 | } |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | $innerCode .= "\$encoder = new {$namespace}Encoder();\n"; |
172 | 172 | $plist = array(); |
173 | 173 | $pCount = count($mSig); |
174 | - for ($i = 1; $i < $pCount; $i++) { |
|
174 | + for ($i = 1; $i<$pCount; $i++) { |
|
175 | 175 | $plist[] = "\$p$i"; |
176 | 176 | $pType = $mSig[$i]; |
177 | 177 | if ($pType == 'i4' || $pType == 'i8' || $pType == 'int' || $pType == 'boolean' || $pType == 'double' || |
@@ -187,19 +187,19 @@ discard block |
||
187 | 187 | } |
188 | 188 | } |
189 | 189 | $innerCode .= "\$req->addparam(\$p$i);\n"; |
190 | - $mDesc .= '* @param ' . xmlrpc_2_php_type($pType) . " \$p$i\n"; |
|
190 | + $mDesc .= '* @param '.xmlrpc_2_php_type($pType)." \$p$i\n"; |
|
191 | 191 | } |
192 | - if ($clientCopyMode < 2) { |
|
192 | + if ($clientCopyMode<2) { |
|
193 | 193 | $plist[] = '$debug=0'; |
194 | 194 | $mDesc .= "* @param int \$debug when 1 (or 2) will enable debugging of the underlying {$prefix} call (defaults to 0)\n"; |
195 | 195 | } |
196 | 196 | $plist = implode(', ', $plist); |
197 | - $mDesc .= '* @return ' . xmlrpc_2_php_type($mSig[0]) . " (or an {$namespace}Response obj instance if call fails)\n*/\n"; |
|
197 | + $mDesc .= '* @return '.xmlrpc_2_php_type($mSig[0])." (or an {$namespace}Response obj instance if call fails)\n*/\n"; |
|
198 | 198 | |
199 | 199 | $innerCode .= "\$res = \${$this_}client->send(\$req, $timeout, '$protocol');\n"; |
200 | 200 | if ($decodeFault) { |
201 | 201 | if (is_string($faultResponse) && ((strpos($faultResponse, '%faultCode%') !== false) || (strpos($faultResponse, '%faultString%') !== false))) { |
202 | - $respCode = "str_replace(array('%faultCode%', '%faultString%'), array(\$res->faultCode(), \$res->faultString()), '" . str_replace("'", "''", $faultResponse) . "')"; |
|
202 | + $respCode = "str_replace(array('%faultCode%', '%faultString%'), array(\$res->faultCode(), \$res->faultString()), '".str_replace("'", "''", $faultResponse)."')"; |
|
203 | 203 | } else { |
204 | 204 | $respCode = var_export($faultResponse, true); |
205 | 205 | } |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | $innerCode .= "if (\$res->faultcode()) return $respCode; else return \$encoder->decode(\$res->value());"; |
213 | 213 | } |
214 | 214 | |
215 | - $code = $code . $plist . ") {\n" . $innerCode . "\n}\n"; |
|
215 | + $code = $code.$plist.") {\n".$innerCode."\n}\n"; |
|
216 | 216 | |
217 | 217 | return array('source' => $code, 'docstring' => $mDesc); |
218 | 218 | } |
@@ -220,10 +220,10 @@ discard block |
||
220 | 220 | /** |
221 | 221 | * @deprecated |
222 | 222 | */ |
223 | -function build_client_wrapper_code($client, $verbatim_client_copy, $prefix='xmlrpc') |
|
223 | +function build_client_wrapper_code($client, $verbatim_client_copy, $prefix = 'xmlrpc') |
|
224 | 224 | { |
225 | 225 | $code = "\$client = new {$prefix}_client('".str_replace("'", "\'", $client->path). |
226 | - "', '" . str_replace("'", "\'", $client->server) . "', $client->port);\n"; |
|
226 | + "', '".str_replace("'", "\'", $client->server)."', $client->port);\n"; |
|
227 | 227 | |
228 | 228 | // copy all client fields to the client that will be generated runtime |
229 | 229 | // (this provides for future expansion or subclassing of client obj) |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/LoggerAwareTestCase.php'; |
|
3 | +include_once __DIR__.'/LoggerAwareTestCase.php'; |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Tests involving Requests and Responses, except for the parsing part |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/LoggerAwareTestCase.php'; |
|
3 | +include_once __DIR__.'/LoggerAwareTestCase.php'; |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Tests involving automatic encoding/decoding of php values into xmlrpc values (the Encoder class). |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | /// @todo it seems that old php versions can not automatically transform latin to utf8 upon xml parsing. |
76 | 76 | /// We should fix that, then re-enable this test |
77 | 77 | if (version_compare(PHP_VERSION, '5.6.0', '>=')) { |
78 | - $i = $e->decodeXml('<?xml version="1.0" encoding="ISO-8859-15" ?><value><string>' . $string . '</string></value>'); |
|
78 | + $i = $e->decodeXml('<?xml version="1.0" encoding="ISO-8859-15" ?><value><string>'.$string.'</string></value>'); |
|
79 | 79 | $this->assertEquals($string, $i->scalarVal()); |
80 | 80 | } |
81 | 81 |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/../lib/xmlrpc.inc'; |
|
4 | -include_once __DIR__ . '/../lib/xmlrpcs.inc'; |
|
3 | +include_once __DIR__.'/../lib/xmlrpc.inc'; |
|
4 | +include_once __DIR__.'/../lib/xmlrpcs.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\Runner\BaseTestRunner; |
11 | 11 | |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | protected function tear_down() |
34 | 34 | { |
35 | - if ($this->args['DEBUG'] > 0) { |
|
35 | + if ($this->args['DEBUG']>0) { |
|
36 | 36 | return; |
37 | 37 | } |
38 | 38 | |
@@ -50,11 +50,11 @@ discard block |
||
50 | 50 | |
51 | 51 | public function debug($message, $context = array()) |
52 | 52 | { |
53 | - $this->buffer .= $message . "\n"; |
|
53 | + $this->buffer .= $message."\n"; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | public function error($message, $context = array()) |
57 | 57 | { |
58 | - $this->buffer .= $message . "\n"; |
|
58 | + $this->buffer .= $message."\n"; |
|
59 | 59 | } |
60 | 60 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/LoggerAwareTestCase.php'; |
|
3 | +include_once __DIR__.'/LoggerAwareTestCase.php'; |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Tests involving the Client class (and no server). |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | $this->client->server .= 'XXX'; |
36 | 36 | $dnsinfo = @dns_get_record($this->client->server); |
37 | 37 | if ($dnsinfo) { |
38 | - $this->markTestSkipped('Seems like there is a catchall DNS in effect: host ' . $this->client->server . ' found'); |
|
38 | + $this->markTestSkipped('Seems like there is a catchall DNS in effect: host '.$this->client->server.' found'); |
|
39 | 39 | } else { |
40 | 40 | $r = $this->client->send($m, 5); |
41 | 41 | // make sure there's no freaking catchall DNS in effect |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | // now test a successful connection |
64 | 64 | $server = explode(':', $this->args['HTTPSERVER']); |
65 | - if (count($server) > 1) { |
|
65 | + if (count($server)>1) { |
|
66 | 66 | $this->client->port = $server[1]; |
67 | 67 | } |
68 | 68 | $this->client->server = $server[0]; |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/LoggerAwareTestCase.php'; |
|
3 | +include_once __DIR__.'/LoggerAwareTestCase.php'; |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Tests involving the Value class. |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | $this->assertequals(1, count($v1)); |
156 | 156 | $out = array('me' => array(), 'mytype' => 2, '_php_class' => null); |
157 | 157 | |
158 | - foreach($v1 as $key => $val) |
|
158 | + foreach ($v1 as $key => $val) |
|
159 | 159 | { |
160 | 160 | $this->assertArrayHasKey($key, $out); |
161 | 161 | $expected = $out[$key]; |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | $this->assertequals(2, count($v2)); |
171 | 171 | $out = array(array('key' => 0, 'value' => 'object'), array('key' => 1, 'value' => 'object')); |
172 | 172 | $i = 0; |
173 | - foreach($v2 as $key => $val) |
|
173 | + foreach ($v2 as $key => $val) |
|
174 | 174 | { |
175 | 175 | $expected = $out[$i]; |
176 | 176 | $this->assertequals($expected['key'], $key); |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | { |
185 | 185 | // nb: make sure that the serialized xml corresponding to this is > 10MB in size |
186 | 186 | $data = array(); |
187 | - for ($i = 0; $i < 500000; $i++ ) { |
|
187 | + for ($i = 0; $i<500000; $i++) { |
|
188 | 188 | $data[] = 'hello world'; |
189 | 189 | } |
190 | 190 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/LoggerAwareTestCase.php'; |
|
3 | +include_once __DIR__.'/LoggerAwareTestCase.php'; |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Tests involving xml parsing. |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | public function testI8() |
103 | 103 | { |
104 | - if (PHP_INT_SIZE == 4 ) { |
|
104 | + if (PHP_INT_SIZE == 4) { |
|
105 | 105 | $this->markTestSkipped('Can not test i8 as php is compiled in 32 bit mode'); |
106 | 106 | return; |
107 | 107 | } |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | |
177 | 177 | public function testUnicodeInMemberName() |
178 | 178 | { |
179 | - $str = "G" . chr(252) . "nter, El" . chr(232) . "ne"; |
|
179 | + $str = "G".chr(252)."nter, El".chr(232)."ne"; |
|
180 | 180 | $v = array($str => new xmlrpcval(1)); |
181 | 181 | $r = new xmlrpcresp(new xmlrpcval($v, 'struct')); |
182 | 182 | $r = $r->serialize(); |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | $response = @utf8_encode( |
193 | 193 | '<?xml version="1.0"?> |
194 | 194 | <!-- covers what happens when lib receives UTF8 chars in response text and comments --> |
195 | -<!-- ' . chr(224) . chr(252) . chr(232) . 'àüè --> |
|
195 | +<!-- ' . chr(224).chr(252).chr(232).'àüè --> |
|
196 | 196 | <methodResponse> |
197 | 197 | <fault> |
198 | 198 | <value> |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | </member> |
204 | 204 | <member> |
205 | 205 | <name>faultString</name> |
206 | -<value><string>' . chr(224) . chr(252) . chr(232) . 'àüè</string></value> |
|
206 | +<value><string>' . chr(224).chr(252).chr(232).'àüè</string></value> |
|
207 | 207 | </member> |
208 | 208 | </struct> |
209 | 209 | </value> |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | $m = $this->newRequest('dummy'); |
213 | 213 | $r = $m->parseResponse($response); |
214 | 214 | $v = $r->faultString(); |
215 | - $this->assertEquals(chr(224) . chr(252) . chr(232) . chr(224) . chr(252) . chr(232), $v); |
|
215 | + $this->assertEquals(chr(224).chr(252).chr(232).chr(224).chr(252).chr(232), $v); |
|
216 | 216 | } |
217 | 217 | |
218 | 218 | public function testBrokenRequests() |
@@ -419,8 +419,8 @@ discard block |
||
419 | 419 | $i = \PhpXmlRpc\PhpXmlRpc::$xmlrpc_reject_invalid_values; |
420 | 420 | \PhpXmlRpc\PhpXmlRpc::$xmlrpc_reject_invalid_values = true; |
421 | 421 | |
422 | - foreach($values as $value) { |
|
423 | - $f = '<?xml version="1.0"?><methodResponse><params><param><value>' . $value . '</value></param></params></methodResponse> '; |
|
422 | + foreach ($values as $value) { |
|
423 | + $f = '<?xml version="1.0"?><methodResponse><params><param><value>'.$value.'</value></param></params></methodResponse> '; |
|
424 | 424 | $r = $s->parseResponse($f); |
425 | 425 | $v = $r->faultCode(); |
426 | 426 | $this->assertEquals(2, $v, "Testing $value"); |
@@ -524,11 +524,11 @@ discard block |
||
524 | 524 | |
525 | 525 | public function testUTF8Response() |
526 | 526 | { |
527 | - $string = chr(224) . chr(252) . chr(232); |
|
527 | + $string = chr(224).chr(252).chr(232); |
|
528 | 528 | |
529 | 529 | $s = $this->newRequest('dummy'); |
530 | - $f = "HTTP/1.1 200 OK\r\nContent-type: text/xml; charset=UTF-8\r\n\r\n" . '<?xml version="1.0"?><methodResponse><params><param><value><struct><member><name>userid</name><value>311127</value></member> |
|
531 | -<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . @utf8_encode($string) . '</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse> |
|
530 | + $f = "HTTP/1.1 200 OK\r\nContent-type: text/xml; charset=UTF-8\r\n\r\n".'<?xml version="1.0"?><methodResponse><params><param><value><struct><member><name>userid</name><value>311127</value></member> |
|
531 | +<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . @utf8_encode($string).'</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse> |
|
532 | 532 | '; |
533 | 533 | $r = $s->parseResponse($f, false, 'phpvals'); |
534 | 534 | $v = $r->value(); |
@@ -536,7 +536,7 @@ discard block |
||
536 | 536 | $this->assertEquals($string, $v); |
537 | 537 | |
538 | 538 | $f = '<?xml version="1.0" encoding="UTF-8"?><methodResponse><params><param><value><struct><member><name>userid</name><value>311127</value></member> |
539 | -<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . @utf8_encode($string) . '</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse> |
|
539 | +<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . @utf8_encode($string).'</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse> |
|
540 | 540 | '; |
541 | 541 | $r = $s->parseResponse($f, false, 'phpvals'); |
542 | 542 | $v = $r->value(); |
@@ -552,11 +552,11 @@ discard block |
||
552 | 552 | |
553 | 553 | public function testLatin1Response() |
554 | 554 | { |
555 | - $string = chr(224) . chr(252) . chr(232); |
|
555 | + $string = chr(224).chr(252).chr(232); |
|
556 | 556 | |
557 | 557 | $s = $this->newRequest('dummy'); |
558 | - $f = "HTTP/1.1 200 OK\r\nContent-type: text/xml; charset=ISO-8859-1\r\n\r\n" . '<?xml version="1.0"?><methodResponse><params><param><value><struct><member><name>userid</name><value>311127</value></member> |
|
559 | -<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . $string . '</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse> |
|
558 | + $f = "HTTP/1.1 200 OK\r\nContent-type: text/xml; charset=ISO-8859-1\r\n\r\n".'<?xml version="1.0"?><methodResponse><params><param><value><struct><member><name>userid</name><value>311127</value></member> |
|
559 | +<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . $string.'</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse> |
|
560 | 560 | '; |
561 | 561 | $r = $s->parseResponse($f, false, 'phpvals'); |
562 | 562 | $v = $r->value(); |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | $this->assertEquals($string, $v); |
565 | 565 | |
566 | 566 | $f = '<?xml version="1.0" encoding="ISO-8859-1"?><methodResponse><params><param><value><struct><member><name>userid</name><value>311127</value></member> |
567 | -<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . $string . '</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse> |
|
567 | +<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . $string.'</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse> |
|
568 | 568 | '; |
569 | 569 | $r = $s->parseResponse($f, false, 'phpvals'); |
570 | 570 | $v = $r->value(); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/LoggerAwareTestCase.php'; |
|
3 | +include_once __DIR__.'/LoggerAwareTestCase.php'; |
|
4 | 4 | |
5 | 5 | use PHPUnit\Extensions\SeleniumCommon\RemoteCoverage; |
6 | 6 | use PHPUnit\Framework\TestResult; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function _run($result = NULL) |
30 | 30 | { |
31 | - $this->testId = get_class($this) . '__' . $this->getName(); |
|
31 | + $this->testId = get_class($this).'__'.$this->getName(); |
|
32 | 32 | |
33 | 33 | if ($result === NULL) { |
34 | 34 | $result = $this->createResult(); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | parent::set_up(); |
60 | 60 | |
61 | 61 | // assumes HTTPURI to be in the form /tests/index.php?etc... |
62 | - $this->baseUrl = 'http://' . $this->args['HTTPSERVER'] . preg_replace('|\?.+|', '', $this->args['HTTPURI']); |
|
63 | - $this->coverageScriptUrl = 'http://' . $this->args['HTTPSERVER'] . preg_replace('|/tests/index\.php(\?.*)?|', '/tests/phpunit_coverage.php', $this->args['HTTPURI']); |
|
62 | + $this->baseUrl = 'http://'.$this->args['HTTPSERVER'].preg_replace('|\?.+|', '', $this->args['HTTPURI']); |
|
63 | + $this->coverageScriptUrl = 'http://'.$this->args['HTTPSERVER'].preg_replace('|/tests/index\.php(\?.*)?|', '/tests/phpunit_coverage.php', $this->args['HTTPURI']); |
|
64 | 64 | } |
65 | 65 | } |
@@ -57,13 +57,13 @@ discard block |
||
57 | 57 | 'scalar' => $val, |
58 | 58 | 'timestamp' => \PhpXmlRpc\Helper\Date::iso8601Decode($val) |
59 | 59 | ); |
60 | - return (object)$xmlrpcVal; |
|
60 | + return (object) $xmlrpcVal; |
|
61 | 61 | case 'base64': |
62 | 62 | $xmlrpcVal = array( |
63 | 63 | 'xmlrpc_type' => 'base64', |
64 | 64 | 'scalar' => $val |
65 | 65 | ); |
66 | - return (object)$xmlrpcVal; |
|
66 | + return (object) $xmlrpcVal; |
|
67 | 67 | case 'string': |
68 | 68 | if (isset($options['extension_api_encoding'])) { |
69 | 69 | // if iconv is not available, we use mb_convert_encoding |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | case 'msg': |
137 | 137 | $paramCount = $xmlrpcVal->getNumParams(); |
138 | 138 | $arr = array(); |
139 | - for ($i = 0; $i < $paramCount; $i++) { |
|
139 | + for ($i = 0; $i<$paramCount; $i++) { |
|
140 | 140 | $arr[] = $this->decode($xmlrpcVal->getParam($i), $options); |
141 | 141 | } |
142 | 142 | return $arr; |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | break; |
262 | 262 | case 'resource': |
263 | 263 | if (in_array('extension_api', $options)) { |
264 | - $xmlrpcVal = new Value((int)$phpVal, Value::$xmlrpcInt); |
|
264 | + $xmlrpcVal = new Value((int) $phpVal, Value::$xmlrpcInt); |
|
265 | 265 | } else { |
266 | 266 | $xmlrpcVal = new Value(); |
267 | 267 | } |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | if (function_exists('mb_convert_encoding')) { |
308 | 308 | $xmlVal = mb_convert_encoding($xmlVal, 'UTF-8', $valEncoding); |
309 | 309 | } else { |
310 | - $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': invalid charset encoding of xml text: ' . $valEncoding); |
|
310 | + $this->getLogger()->error('XML-RPC: '.__METHOD__.': invalid charset encoding of xml text: '.$valEncoding); |
|
311 | 311 | } |
312 | 312 | } |
313 | 313 | } |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | $parserOptions |
329 | 329 | ); |
330 | 330 | |
331 | - if ($xmlRpcParser->_xh['isf'] > 1) { |
|
331 | + if ($xmlRpcParser->_xh['isf']>1) { |
|
332 | 332 | // test that $xmlrpc->_xh['value'] is an obj, too??? |
333 | 333 | |
334 | 334 | $this->getLogger()->error($xmlRpcParser->_xh['isf_reason']); |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | |
353 | 353 | case 'methodcall': |
354 | 354 | $req = new Request($xmlRpcParser->_xh['method']); |
355 | - for ($i = 0; $i < count($xmlRpcParser->_xh['params']); $i++) { |
|
355 | + for ($i = 0; $i<count($xmlRpcParser->_xh['params']); $i++) { |
|
356 | 356 | $req->addParam($xmlRpcParser->_xh['params'][$i]); |
357 | 357 | } |
358 | 358 | return $req; |