@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $this->me['struct'] = $val; |
94 | 94 | break; |
95 | 95 | default: |
96 | - $this->getLogger()->error("XML-RPC: " . __METHOD__ . ": not a known type ($type)"); |
|
96 | + $this->getLogger()->error("XML-RPC: ".__METHOD__.": not a known type ($type)"); |
|
97 | 97 | } |
98 | 98 | } |
99 | 99 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | } |
118 | 118 | |
119 | 119 | if ($typeOf !== 1) { |
120 | - $this->getLogger()->error("XML-RPC: " . __METHOD__ . ": not a scalar type ($type)"); |
|
120 | + $this->getLogger()->error("XML-RPC: ".__METHOD__.": not a scalar type ($type)"); |
|
121 | 121 | return 0; |
122 | 122 | } |
123 | 123 | |
@@ -134,10 +134,10 @@ discard block |
||
134 | 134 | |
135 | 135 | switch ($this->mytype) { |
136 | 136 | case 1: |
137 | - $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': scalar xmlrpc value can have only one value'); |
|
137 | + $this->getLogger()->error('XML-RPC: '.__METHOD__.': scalar xmlrpc value can have only one value'); |
|
138 | 138 | return 0; |
139 | 139 | case 3: |
140 | - $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': cannot add anonymous scalar to struct xmlrpc value'); |
|
140 | + $this->getLogger()->error('XML-RPC: '.__METHOD__.': cannot add anonymous scalar to struct xmlrpc value'); |
|
141 | 141 | return 0; |
142 | 142 | case 2: |
143 | 143 | // we're adding a scalar value to an array here |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | |
180 | 180 | return 1; |
181 | 181 | } else { |
182 | - $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': already initialized as a [' . $this->kindOf() . ']'); |
|
182 | + $this->getLogger()->error('XML-RPC: '.__METHOD__.': already initialized as a ['.$this->kindOf().']'); |
|
183 | 183 | return 0; |
184 | 184 | } |
185 | 185 | } |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | |
210 | 210 | return 1; |
211 | 211 | } else { |
212 | - $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': already initialized as a [' . $this->kindOf() . ']'); |
|
212 | + $this->getLogger()->error('XML-RPC: '.__METHOD__.': already initialized as a ['.$this->kindOf().']'); |
|
213 | 213 | return 0; |
214 | 214 | } |
215 | 215 | } |
@@ -251,19 +251,19 @@ discard block |
||
251 | 251 | case 1: |
252 | 252 | switch ($typ) { |
253 | 253 | case static::$xmlrpcBase64: |
254 | - $rs .= "<{$typ}>" . base64_encode($val) . "</{$typ}>"; |
|
254 | + $rs .= "<{$typ}>".base64_encode($val)."</{$typ}>"; |
|
255 | 255 | break; |
256 | 256 | case static::$xmlrpcBoolean: |
257 | - $rs .= "<{$typ}>" . ($val ? '1' : '0') . "</{$typ}>"; |
|
257 | + $rs .= "<{$typ}>".($val ? '1' : '0')."</{$typ}>"; |
|
258 | 258 | break; |
259 | 259 | case static::$xmlrpcString: |
260 | 260 | // Do NOT use htmlentities, since it will produce named html entities, which are invalid xml |
261 | - $rs .= "<{$typ}>" . $this->getCharsetEncoder()->encodeEntities($val, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding) . "</{$typ}>"; |
|
261 | + $rs .= "<{$typ}>".$this->getCharsetEncoder()->encodeEntities($val, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding)."</{$typ}>"; |
|
262 | 262 | break; |
263 | 263 | case static::$xmlrpcInt: |
264 | 264 | case static::$xmlrpcI4: |
265 | 265 | case static::$xmlrpcI8: |
266 | - $rs .= "<{$typ}>" . (int)$val . "</{$typ}>"; |
|
266 | + $rs .= "<{$typ}>".(int) $val."</{$typ}>"; |
|
267 | 267 | break; |
268 | 268 | case static::$xmlrpcDouble: |
269 | 269 | // avoid using standard conversion of float to string because it is locale-dependent, |
@@ -271,16 +271,16 @@ discard block |
||
271 | 271 | // sprintf('%F') could be most likely ok, but it fails e.g. on 2e-14. |
272 | 272 | // The code below tries its best at keeping max precision while avoiding exp notation, |
273 | 273 | // but there is of course no limit in the number of decimal places to be used... |
274 | - $rs .= "<{$typ}>" . preg_replace('/\\.?0+$/', '', number_format((double)$val, PhpXmlRpc::$xmlpc_double_precision, '.', '')) . "</{$typ}>"; |
|
274 | + $rs .= "<{$typ}>".preg_replace('/\\.?0+$/', '', number_format((double) $val, PhpXmlRpc::$xmlpc_double_precision, '.', ''))."</{$typ}>"; |
|
275 | 275 | break; |
276 | 276 | case static::$xmlrpcDateTime: |
277 | 277 | if (is_string($val)) { |
278 | 278 | $rs .= "<{$typ}>{$val}</{$typ}>"; |
279 | 279 | // DateTimeInterface is not present in php 5.4... |
280 | 280 | } elseif (is_a($val, 'DateTimeInterface') || is_a($val, 'DateTime')) { |
281 | - $rs .= "<{$typ}>" . $val->format('Ymd\TH:i:s') . "</{$typ}>"; |
|
281 | + $rs .= "<{$typ}>".$val->format('Ymd\TH:i:s')."</{$typ}>"; |
|
282 | 282 | } elseif (is_int($val)) { |
283 | - $rs .= "<{$typ}>" . date('Ymd\TH:i:s', $val) . "</{$typ}>"; |
|
283 | + $rs .= "<{$typ}>".date('Ymd\TH:i:s', $val)."</{$typ}>"; |
|
284 | 284 | } else { |
285 | 285 | // not really a good idea here: but what should we output anyway? left for backward compat... |
286 | 286 | $rs .= "<{$typ}>{$val}</{$typ}>"; |
@@ -302,14 +302,14 @@ discard block |
||
302 | 302 | case 3: |
303 | 303 | // struct |
304 | 304 | if ($this->_php_class) { |
305 | - $rs .= '<struct php_class="' . $this->_php_class . "\">\n"; |
|
305 | + $rs .= '<struct php_class="'.$this->_php_class."\">\n"; |
|
306 | 306 | } else { |
307 | 307 | $rs .= "<struct>\n"; |
308 | 308 | } |
309 | 309 | $charsetEncoder = $this->getCharsetEncoder(); |
310 | 310 | /** @var Value $val2 */ |
311 | 311 | foreach ($val as $key2 => $val2) { |
312 | - $rs .= '<member><name>' . $charsetEncoder->encodeEntities($key2, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding) . "</name>\n"; |
|
312 | + $rs .= '<member><name>'.$charsetEncoder->encodeEntities($key2, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding)."</name>\n"; |
|
313 | 313 | //$rs.=$this->serializeval($val2); |
314 | 314 | $rs .= $val2->serialize($charsetEncoding); |
315 | 315 | $rs .= "</member>\n"; |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | $val = reset($this->me); |
345 | 345 | $typ = key($this->me); |
346 | 346 | |
347 | - return '<value>' . $this->serializedata($typ, $val, $charsetEncoding) . "</value>\n"; |
|
347 | + return '<value>'.$this->serializedata($typ, $val, $charsetEncoding)."</value>\n"; |
|
348 | 348 | } |
349 | 349 | |
350 | 350 | /** |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/PolyfillTestCase.php'; |
|
3 | +include_once __DIR__.'/PolyfillTestCase.php'; |
|
4 | 4 | |
5 | 5 | use PhpXmlRpc\Helper\Charset; |
6 | 6 | use PhpXmlRpc\Helper\Http; |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | $l = $h->getLogger(); |
39 | 39 | Http::setLogger($this); |
40 | 40 | |
41 | - $s = "HTTP/1.0 200 OK\r\n" . |
|
42 | - "Content-Type: unknown\r\n" . |
|
43 | - "\r\n" . |
|
41 | + $s = "HTTP/1.0 200 OK\r\n". |
|
42 | + "Content-Type: unknown\r\n". |
|
43 | + "\r\n". |
|
44 | 44 | "body"; |
45 | 45 | ob_start(); |
46 | 46 | $h->parseResponseHeaders($s, false, 1); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | // user declares the type of resp value: we "almost" trust it... but log errors just in case |
74 | 74 | if (($this->valtyp == 'xmlrpcvals' && (!is_a($this->val, 'PhpXmlRpc\Value'))) || |
75 | 75 | ($this->valtyp == 'xml' && (!is_string($this->val)))) { |
76 | - $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': value passed in does not match type ' . $valType); |
|
76 | + $this->getLogger()->error('XML-RPC: '.__METHOD__.': value passed in does not match type '.$valType); |
|
77 | 77 | } |
78 | 78 | } |
79 | 79 | } |
@@ -152,33 +152,33 @@ discard block |
||
152 | 152 | public function serialize($charsetEncoding = '') |
153 | 153 | { |
154 | 154 | if ($charsetEncoding != '') { |
155 | - $this->content_type = 'text/xml; charset=' . $charsetEncoding; |
|
155 | + $this->content_type = 'text/xml; charset='.$charsetEncoding; |
|
156 | 156 | } else { |
157 | 157 | $this->content_type = 'text/xml'; |
158 | 158 | } |
159 | 159 | if (PhpXmlRpc::$xmlrpc_null_apache_encoding) { |
160 | - $result = "<methodResponse xmlns:ex=\"" . PhpXmlRpc::$xmlrpc_null_apache_encoding_ns . "\">\n"; |
|
160 | + $result = "<methodResponse xmlns:ex=\"".PhpXmlRpc::$xmlrpc_null_apache_encoding_ns."\">\n"; |
|
161 | 161 | } else { |
162 | 162 | $result = "<methodResponse>\n"; |
163 | 163 | } |
164 | 164 | if ($this->errno) { |
165 | 165 | // Let non-ASCII response messages be tolerated by clients by xml-encoding non ascii chars |
166 | - $result .= "<fault>\n" . |
|
167 | - "<value>\n<struct><member><name>faultCode</name>\n<value><int>" . $this->errno . |
|
168 | - "</int></value>\n</member>\n<member>\n<name>faultString</name>\n<value><string>" . |
|
169 | - $this->getCharsetEncoder()->encodeEntities($this->errstr, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding) . |
|
166 | + $result .= "<fault>\n". |
|
167 | + "<value>\n<struct><member><name>faultCode</name>\n<value><int>".$this->errno. |
|
168 | + "</int></value>\n</member>\n<member>\n<name>faultString</name>\n<value><string>". |
|
169 | + $this->getCharsetEncoder()->encodeEntities($this->errstr, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding). |
|
170 | 170 | "</string></value>\n</member>\n</struct>\n</value>\n</fault>"; |
171 | 171 | } else { |
172 | 172 | if (is_object($this->val) && is_a($this->val, 'PhpXmlRpc\Value')) { |
173 | - $result .= "<params>\n<param>\n" . $this->val->serialize($charsetEncoding) . "</param>\n</params>"; |
|
173 | + $result .= "<params>\n<param>\n".$this->val->serialize($charsetEncoding)."</param>\n</params>"; |
|
174 | 174 | } else if (is_string($this->val) && $this->valtyp == 'xml') { |
175 | - $result .= "<params>\n<param>\n" . |
|
176 | - $this->val . |
|
175 | + $result .= "<params>\n<param>\n". |
|
176 | + $this->val. |
|
177 | 177 | "</param>\n</params>"; |
178 | 178 | } else if ($this->valtyp == 'phpvals') { |
179 | 179 | $encoder = new Encoder(); |
180 | 180 | $val = $encoder->encode($this->val); |
181 | - $result .= "<params>\n<param>\n" . $val->serialize($charsetEncoding) . "</param>\n</params>"; |
|
181 | + $result .= "<params>\n<param>\n".$val->serialize($charsetEncoding)."</param>\n</params>"; |
|
182 | 182 | } else { |
183 | 183 | throw new StateErrorException('cannot serialize xmlrpc response objects whose content is native php values'); |
184 | 184 | } |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | return $this->httpResponse['raw_data']; |
205 | 205 | default: |
206 | 206 | $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); |
207 | - trigger_error('Undefined property via __get(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_WARNING); |
|
207 | + trigger_error('Undefined property via __get(): '.$name.' in '.$trace[0]['file'].' on line '.$trace[0]['line'], E_USER_WARNING); |
|
208 | 208 | return null; |
209 | 209 | } |
210 | 210 | } |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | break; |
226 | 226 | default: |
227 | 227 | $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); |
228 | - trigger_error('Undefined property via __set(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_WARNING); |
|
228 | + trigger_error('Undefined property via __set(): '.$name.' in '.$trace[0]['file'].' on line '.$trace[0]['line'], E_USER_WARNING); |
|
229 | 229 | } |
230 | 230 | } |
231 | 231 | |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | break; |
260 | 260 | default: |
261 | 261 | $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); |
262 | - trigger_error('Undefined property via __unset(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_WARNING); |
|
262 | + trigger_error('Undefined property via __unset(): '.$name.' in '.$trace[0]['file'].' on line '.$trace[0]['line'], E_USER_WARNING); |
|
263 | 263 | } |
264 | 264 | } |
265 | 265 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/WebTestCase.php'; |
|
3 | +include_once __DIR__.'/WebTestCase.php'; |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Tests for php files in the 'extras' directory. |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/WebTestCase.php'; |
|
3 | +include_once __DIR__.'/WebTestCase.php'; |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Tests for php files in the 'demo' directory. |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/../lib/xmlrpc_wrappers.inc'; |
|
3 | +include_once __DIR__.'/../lib/xmlrpc_wrappers.inc'; |
|
4 | 4 | |
5 | -include_once __DIR__ . '/ServerAwareTestCase.php'; |
|
5 | +include_once __DIR__.'/ServerAwareTestCase.php'; |
|
6 | 6 | |
7 | 7 | /** |
8 | 8 | * Tests which involve interaction with the server - carried out via the client. |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | // (but only if not called from subclass objects / multitests) |
30 | 30 | if (function_exists('debug_backtrace') && strtolower(get_called_class()) == 'localhosttests') { |
31 | 31 | $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); |
32 | - for ($i = 0; $i < count($trace); $i++) { |
|
32 | + for ($i = 0; $i<count($trace); $i++) { |
|
33 | 33 | if (strpos($trace[$i]['function'], 'test') === 0) { |
34 | 34 | self::$failed_tests[$trace[$i]['function']] = true; |
35 | 35 | break; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | parent::set_up(); |
46 | 46 | |
47 | 47 | $server = explode(':', $this->args['HTTPSERVER']); |
48 | - if (count($server) > 1) { |
|
48 | + if (count($server)>1) { |
|
49 | 49 | $this->client = new xmlrpc_client($this->args['HTTPURI'], $server[0], $server[1]); |
50 | 50 | } else { |
51 | 51 | $this->client = new xmlrpc_client($this->args['HTTPURI'], $this->args['HTTPSERVER']); |
@@ -75,9 +75,9 @@ discard block |
||
75 | 75 | } |
76 | 76 | $this->validateResponse($r); |
77 | 77 | if (is_array($errorCode)) { |
78 | - $this->assertContains($r->faultCode(), $errorCode, 'Error ' . $r->faultCode() . ' connecting to server: ' . $r->faultString()); |
|
78 | + $this->assertContains($r->faultCode(), $errorCode, 'Error '.$r->faultCode().' connecting to server: '.$r->faultString()); |
|
79 | 79 | } else { |
80 | - $this->assertEquals($errorCode, $r->faultCode(), 'Error ' . $r->faultCode() . ' connecting to server: ' . $r->faultString()); |
|
80 | + $this->assertEquals($errorCode, $r->faultCode(), 'Error '.$r->faultCode().' connecting to server: '.$r->faultString()); |
|
81 | 81 | } |
82 | 82 | if (!$r->faultCode()) { |
83 | 83 | if ($returnResponse) { |
@@ -104,20 +104,20 @@ discard block |
||
104 | 104 | $query = parse_url($this->client->path, PHP_URL_QUERY); |
105 | 105 | parse_str($query, $vars); |
106 | 106 | $query = http_build_query(array_merge($vars, $data)); |
107 | - $this->client->path = parse_url($this->client->path, PHP_URL_PATH) . '?' . $query; |
|
107 | + $this->client->path = parse_url($this->client->path, PHP_URL_PATH).'?'.$query; |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | public function testString() |
111 | 111 | { |
112 | - $sendString = "here are 3 \"entities\": < > & " . |
|
113 | - "and here's a dollar sign: \$pretendvarname and a backslash too: " . chr(92) . |
|
114 | - " - isn't that great? \\\"hackery\\\" at it's best " . |
|
115 | - " also don't want to miss out on \$item[0]. " . |
|
116 | - "The real weird stuff follows: CRLF here" . chr(13) . chr(10) . |
|
117 | - "a simple CR here" . chr(13) . |
|
118 | - "a simple LF here" . chr(10) . |
|
119 | - "and then LFCR" . chr(10) . chr(13) . |
|
120 | - "last but not least weird names: G" . chr(252) . "nter, El" . chr(232) . "ne, and an xml comment closing tag: -->"; |
|
112 | + $sendString = "here are 3 \"entities\": < > & ". |
|
113 | + "and here's a dollar sign: \$pretendvarname and a backslash too: ".chr(92). |
|
114 | + " - isn't that great? \\\"hackery\\\" at it's best ". |
|
115 | + " also don't want to miss out on \$item[0]. ". |
|
116 | + "The real weird stuff follows: CRLF here".chr(13).chr(10). |
|
117 | + "a simple CR here".chr(13). |
|
118 | + "a simple LF here".chr(10). |
|
119 | + "and then LFCR".chr(10).chr(13). |
|
120 | + "last but not least weird names: G".chr(252)."nter, El".chr(232)."ne, and an xml comment closing tag: -->"; |
|
121 | 121 | $m = new xmlrpcmsg('examples.stringecho', array( |
122 | 122 | new xmlrpcval($sendString, 'string'), |
123 | 123 | )); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | public function testLatin1String() |
139 | 139 | { |
140 | 140 | $sendString = |
141 | - "last but not least weird names: G" . chr(252) . "nter, El" . chr(232) . "ne"; |
|
141 | + "last but not least weird names: G".chr(252)."nter, El".chr(232)."ne"; |
|
142 | 142 | $x = '<?xml version="1.0" encoding="ISO-8859-1"?><methodCall><methodName>examples.stringecho</methodName><params><param><value>'. |
143 | 143 | $sendString. |
144 | 144 | '</value></param></params></methodCall>'; |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | public function testUtf8Method() |
248 | 248 | { |
249 | 249 | PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding = 'UTF-8'; |
250 | - $m = new xmlrpcmsg("tests.utf8methodname." . 'κόσμε', array( |
|
250 | + $m = new xmlrpcmsg("tests.utf8methodname.".'κόσμε', array( |
|
251 | 251 | new xmlrpcval('hello') |
252 | 252 | )); |
253 | 253 | $v = $this->send($m); |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | )); |
269 | 269 | $v = $this->send($m); |
270 | 270 | if ($v) { |
271 | - $this->assertEquals($a + $b, $v->scalarval()); |
|
271 | + $this->assertEquals($a+$b, $v->scalarval()); |
|
272 | 272 | } |
273 | 273 | } |
274 | 274 | |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | )); |
281 | 281 | $v = $this->send($m); |
282 | 282 | if ($v) { |
283 | - $this->assertEquals(12 - 23, $v->scalarval()); |
|
283 | + $this->assertEquals(12-23, $v->scalarval()); |
|
284 | 284 | } |
285 | 285 | } |
286 | 286 | |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | if ($v) { |
320 | 320 | $sz = $v->arraysize(); |
321 | 321 | $got = ''; |
322 | - for ($i = 0; $i < $sz; $i++) { |
|
322 | + for ($i = 0; $i<$sz; $i++) { |
|
323 | 323 | $b = $v->arraymem($i); |
324 | 324 | if ($b->scalarval()) { |
325 | 325 | $got .= '1'; |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | $got = ''; |
367 | 367 | $expected = '37210'; |
368 | 368 | $expect_array = array('ctLeftAngleBrackets', 'ctRightAngleBrackets', 'ctAmpersands', 'ctApostrophes', 'ctQuotes'); |
369 | - foreach($expect_array as $val) { |
|
369 | + foreach ($expect_array as $val) { |
|
370 | 370 | $b = $v->structmem($val); |
371 | 371 | $got .= $b->me['int']; |
372 | 372 | } |
@@ -868,7 +868,7 @@ discard block |
||
868 | 868 | { |
869 | 869 | // make a 'deep client copy' as the original one might have many properties set |
870 | 870 | // also for speed only wrap one method of the whole server |
871 | - $class = wrap_xmlrpc_server($this->client, array('simple_client_copy' => 0, 'method_filter' => '/examples\.getStateName/' )); |
|
871 | + $class = wrap_xmlrpc_server($this->client, array('simple_client_copy' => 0, 'method_filter' => '/examples\.getStateName/')); |
|
872 | 872 | if ($class == '') { |
873 | 873 | $this->fail('Registration of remote server failed'); |
874 | 874 | } else { |
@@ -907,9 +907,9 @@ discard block |
||
907 | 907 | $cookies = array( |
908 | 908 | //'c1' => array(), |
909 | 909 | 'c2' => array('value' => 'c2'), |
910 | - 'c3' => array('value' => 'c3', 'expires' => time() + 60 * 60 * 24 * 30), |
|
911 | - 'c4' => array('value' => 'c4', 'expires' => time() + 60 * 60 * 24 * 30, 'path' => '/'), |
|
912 | - 'c5' => array('value' => 'c5', 'expires' => time() + 60 * 60 * 24 * 30, 'path' => '/', 'domain' => 'localhost'), |
|
910 | + 'c3' => array('value' => 'c3', 'expires' => time()+60 * 60 * 24 * 30), |
|
911 | + 'c4' => array('value' => 'c4', 'expires' => time()+60 * 60 * 24 * 30, 'path' => '/'), |
|
912 | + 'c5' => array('value' => 'c5', 'expires' => time()+60 * 60 * 24 * 30, 'path' => '/', 'domain' => 'localhost'), |
|
913 | 913 | ); |
914 | 914 | $cookiesval = php_xmlrpc_encode($cookies); |
915 | 915 | $m = new xmlrpcmsg('tests.setcookies', array($cookiesval)); |
@@ -957,10 +957,10 @@ discard block |
||
957 | 957 | $m = new xmlrpcmsg('tests.getcookies', array()); |
958 | 958 | foreach ($cookies as $cookie => $val) { |
959 | 959 | $this->client->setCookie($cookie, $val); |
960 | - $cookies[$cookie] = (string)$cookies[$cookie]; |
|
960 | + $cookies[$cookie] = (string) $cookies[$cookie]; |
|
961 | 961 | } |
962 | 962 | $r = $this->client->send($m, $this->timeout, $this->method); |
963 | - $this->assertEquals(0, $r->faultCode(), 'Error ' . $r->faultCode() . ' connecting to server: ' . $r->faultString()); |
|
963 | + $this->assertEquals(0, $r->faultCode(), 'Error '.$r->faultCode().' connecting to server: '.$r->faultString()); |
|
964 | 964 | if (!$r->faultCode()) { |
965 | 965 | $v = $r->value(); |
966 | 966 | $v = php_xmlrpc_decode($v); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/ServerAwareTestCase.php'; |
|
3 | +include_once __DIR__.'/ServerAwareTestCase.php'; |
|
4 | 4 | |
5 | 5 | abstract class PhpXmlRpc_WebTestCase extends PhpXmlRpc_ServerAwareTestCase |
6 | 6 | { |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | */ |
16 | 16 | protected function request($path, $method = 'GET', $payload = '', $emptyPageOk = false) |
17 | 17 | { |
18 | - $url = $this->baseUrl . $path; |
|
18 | + $url = $this->baseUrl.$path; |
|
19 | 19 | |
20 | 20 | $ch = curl_init($url); |
21 | 21 | curl_setopt_array($ch, array( |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | { |
34 | 34 | curl_setopt($ch, CURLOPT_COOKIE, 'PHPUNIT_SELENIUM_TEST_ID='.$this->testId); |
35 | 35 | } |
36 | - if ($this->args['DEBUG'] > 0) { |
|
36 | + if ($this->args['DEBUG']>0) { |
|
37 | 37 | curl_setopt($ch, CURLOPT_VERBOSE, 1); |
38 | 38 | } |
39 | 39 | $page = curl_exec($ch); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | protected function newClient($path) |
59 | 59 | { |
60 | - $client = new \PhpXmlRpc\Client($this->baseUrl . $path); |
|
60 | + $client = new \PhpXmlRpc\Client($this->baseUrl.$path); |
|
61 | 61 | if ($this->collectCodeCoverageInformation) { |
62 | 62 | $client->setCookie('PHPUNIT_SELENIUM_TEST_ID', $this->testId); |
63 | 63 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/WebTestCase.php'; |
|
3 | +include_once __DIR__.'/WebTestCase.php'; |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Tests for the bundled debugger. |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | * @author JoakimLofgren |
4 | 4 | */ |
5 | 5 | |
6 | -include_once __DIR__ . '/PolyfillTestCase.php'; |
|
6 | +include_once __DIR__.'/PolyfillTestCase.php'; |
|
7 | 7 | |
8 | 8 | use PhpXmlRpc\Helper\Charset; |
9 | 9 | |
@@ -48,10 +48,10 @@ discard block |
||
48 | 48 | public function testUtf8ToLatin1All() |
49 | 49 | { |
50 | 50 | $latinString = "\n\r\t"; |
51 | - for($i = 32; $i < 127; $i++) { |
|
51 | + for ($i = 32; $i<127; $i++) { |
|
52 | 52 | $latinString .= chr($i); |
53 | 53 | } |
54 | - for($i = 160; $i < 256; $i++) { |
|
54 | + for ($i = 160; $i<256; $i++) { |
|
55 | 55 | $latinString .= chr($i); |
56 | 56 | } |
57 | 57 |