@@ -2,20 +2,20 @@ |
||
2 | 2 | |
3 | 3 | use PHPUnit\Runner\Version as PHPUnit_Version; |
4 | 4 | |
5 | -if ( class_exists( 'PHPUnit_Extensions_SeleniumCommon_RemoteCoverage' ) === true |
|
6 | - && class_exists( 'PHPUnit\Extensions\SeleniumCommon\RemoteCoverage' ) === false |
|
5 | +if (class_exists('PHPUnit_Extensions_SeleniumCommon_RemoteCoverage') === true |
|
6 | + && class_exists('PHPUnit\Extensions\SeleniumCommon\RemoteCoverage') === false |
|
7 | 7 | ) { |
8 | - class_alias( 'PHPUnit_Extensions_SeleniumCommon_RemoteCoverage', 'PHPUnit\Extensions\SeleniumCommon\RemoteCoverage' ); |
|
8 | + class_alias('PHPUnit_Extensions_SeleniumCommon_RemoteCoverage', 'PHPUnit\Extensions\SeleniumCommon\RemoteCoverage'); |
|
9 | 9 | } |
10 | 10 | |
11 | -if ( class_exists( 'PHPUnit_Runner_BaseTestRunner' ) === true |
|
12 | - && class_exists( 'PHPUnit\Runner\BaseTestRunner' ) === false |
|
11 | +if (class_exists('PHPUnit_Runner_BaseTestRunner') === true |
|
12 | + && class_exists('PHPUnit\Runner\BaseTestRunner') === false |
|
13 | 13 | ) { |
14 | - class_alias( 'PHPUnit_Runner_BaseTestRunner', 'PHPUnit\Runner\BaseTestRunner' ); |
|
14 | + class_alias('PHPUnit_Runner_BaseTestRunner', 'PHPUnit\Runner\BaseTestRunner'); |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | if (class_exists('PHPUnit_Version') === false || version_compare(PHPUnit_Version::id(), '8.0.0', '<')) { |
18 | - include_once __DIR__ . '/PolyfillTestCase7.php'; |
|
18 | + include_once __DIR__.'/PolyfillTestCase7.php'; |
|
19 | 19 | } else { |
20 | - include_once __DIR__ . '/PolyfillTestCase8.php'; |
|
20 | + include_once __DIR__.'/PolyfillTestCase8.php'; |
|
21 | 21 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $this->me['struct'] = $val; |
120 | 120 | break; |
121 | 121 | default: |
122 | - $this->getLogger()->errorLog("XML-RPC: " . __METHOD__ . ": not a known type ($type)"); |
|
122 | + $this->getLogger()->errorLog("XML-RPC: ".__METHOD__.": not a known type ($type)"); |
|
123 | 123 | } |
124 | 124 | } |
125 | 125 | } |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | } |
145 | 145 | |
146 | 146 | if ($typeOf !== 1) { |
147 | - $this->getLogger()->errorLog("XML-RPC: " . __METHOD__ . ": not a scalar type ($type)"); |
|
147 | + $this->getLogger()->errorLog("XML-RPC: ".__METHOD__.": not a scalar type ($type)"); |
|
148 | 148 | return 0; |
149 | 149 | } |
150 | 150 | |
@@ -161,10 +161,10 @@ discard block |
||
161 | 161 | |
162 | 162 | switch ($this->mytype) { |
163 | 163 | case 1: |
164 | - $this->getLogger()->errorLog('XML-RPC: ' . __METHOD__ . ': scalar xmlrpc value can have only one value'); |
|
164 | + $this->getLogger()->errorLog('XML-RPC: '.__METHOD__.': scalar xmlrpc value can have only one value'); |
|
165 | 165 | return 0; |
166 | 166 | case 3: |
167 | - $this->getLogger()->errorLog('XML-RPC: ' . __METHOD__ . ': cannot add anonymous scalar to struct xmlrpc value'); |
|
167 | + $this->getLogger()->errorLog('XML-RPC: '.__METHOD__.': cannot add anonymous scalar to struct xmlrpc value'); |
|
168 | 168 | return 0; |
169 | 169 | case 2: |
170 | 170 | // we're adding a scalar value to an array here |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | |
207 | 207 | return 1; |
208 | 208 | } else { |
209 | - $this->getLogger()->errorLog('XML-RPC: ' . __METHOD__ . ': already initialized as a [' . $this->kindOf() . ']'); |
|
209 | + $this->getLogger()->errorLog('XML-RPC: '.__METHOD__.': already initialized as a ['.$this->kindOf().']'); |
|
210 | 210 | return 0; |
211 | 211 | } |
212 | 212 | } |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | |
238 | 238 | return 1; |
239 | 239 | } else { |
240 | - $this->getLogger()->errorLog('XML-RPC: ' . __METHOD__ . ': already initialized as a [' . $this->kindOf() . ']'); |
|
240 | + $this->getLogger()->errorLog('XML-RPC: '.__METHOD__.': already initialized as a ['.$this->kindOf().']'); |
|
241 | 241 | return 0; |
242 | 242 | } |
243 | 243 | } |
@@ -279,19 +279,19 @@ discard block |
||
279 | 279 | case 1: |
280 | 280 | switch ($typ) { |
281 | 281 | case static::$xmlrpcBase64: |
282 | - $rs .= "<${typ}>" . base64_encode($val) . "</${typ}>"; |
|
282 | + $rs .= "<${typ}>".base64_encode($val)."</${typ}>"; |
|
283 | 283 | break; |
284 | 284 | case static::$xmlrpcBoolean: |
285 | - $rs .= "<${typ}>" . ($val ? '1' : '0') . "</${typ}>"; |
|
285 | + $rs .= "<${typ}>".($val ? '1' : '0')."</${typ}>"; |
|
286 | 286 | break; |
287 | 287 | case static::$xmlrpcString: |
288 | 288 | // Do NOT use htmlentities, since it will produce named html entities, which are invalid xml |
289 | - $rs .= "<${typ}>" . $this->getCharsetEncoder()->encodeEntities($val, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding) . "</${typ}>"; |
|
289 | + $rs .= "<${typ}>".$this->getCharsetEncoder()->encodeEntities($val, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding)."</${typ}>"; |
|
290 | 290 | break; |
291 | 291 | case static::$xmlrpcInt: |
292 | 292 | case static::$xmlrpcI4: |
293 | 293 | case static::$xmlrpcI8: |
294 | - $rs .= "<${typ}>" . (int)$val . "</${typ}>"; |
|
294 | + $rs .= "<${typ}>".(int) $val."</${typ}>"; |
|
295 | 295 | break; |
296 | 296 | case static::$xmlrpcDouble: |
297 | 297 | // avoid using standard conversion of float to string because it is locale-dependent, |
@@ -299,16 +299,16 @@ discard block |
||
299 | 299 | // sprintf('%F') could be most likely ok but it fails eg. on 2e-14. |
300 | 300 | // The code below tries its best at keeping max precision while avoiding exp notation, |
301 | 301 | // but there is of course no limit in the number of decimal places to be used... |
302 | - $rs .= "<${typ}>" . preg_replace('/\\.?0+$/', '', number_format((double)$val, PhpXmlRpc::$xmlpc_double_precision, '.', '')) . "</${typ}>"; |
|
302 | + $rs .= "<${typ}>".preg_replace('/\\.?0+$/', '', number_format((double) $val, PhpXmlRpc::$xmlpc_double_precision, '.', ''))."</${typ}>"; |
|
303 | 303 | break; |
304 | 304 | case static::$xmlrpcDateTime: |
305 | 305 | if (is_string($val)) { |
306 | 306 | $rs .= "<${typ}>${val}</${typ}>"; |
307 | 307 | // DateTimeInterface is not present in php 5.4... |
308 | 308 | } elseif (is_a($val, 'DateTimeInterface') || is_a($val, 'DateTime')) { |
309 | - $rs .= "<${typ}>" . $val->format('Ymd\TH:i:s') . "</${typ}>"; |
|
309 | + $rs .= "<${typ}>".$val->format('Ymd\TH:i:s')."</${typ}>"; |
|
310 | 310 | } elseif (is_int($val)) { |
311 | - $rs .= "<${typ}>" . date('Ymd\TH:i:s', $val) . "</${typ}>"; |
|
311 | + $rs .= "<${typ}>".date('Ymd\TH:i:s', $val)."</${typ}>"; |
|
312 | 312 | } else { |
313 | 313 | // not really a good idea here: but what should we output anyway? left for backward compat... |
314 | 314 | $rs .= "<${typ}>${val}</${typ}>"; |
@@ -330,14 +330,14 @@ discard block |
||
330 | 330 | case 3: |
331 | 331 | // struct |
332 | 332 | if ($this->_php_class) { |
333 | - $rs .= '<struct php_class="' . $this->_php_class . "\">\n"; |
|
333 | + $rs .= '<struct php_class="'.$this->_php_class."\">\n"; |
|
334 | 334 | } else { |
335 | 335 | $rs .= "<struct>\n"; |
336 | 336 | } |
337 | 337 | $charsetEncoder = $this->getCharsetEncoder(); |
338 | 338 | /** @var Value $val2 */ |
339 | 339 | foreach ($val as $key2 => $val2) { |
340 | - $rs .= '<member><name>' . $charsetEncoder->encodeEntities($key2, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding) . "</name>\n"; |
|
340 | + $rs .= '<member><name>'.$charsetEncoder->encodeEntities($key2, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding)."</name>\n"; |
|
341 | 341 | //$rs.=$this->serializeval($val2); |
342 | 342 | $rs .= $val2->serialize($charsetEncoding); |
343 | 343 | $rs .= "</member>\n"; |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | $val = reset($this->me); |
374 | 374 | $typ = key($this->me); |
375 | 375 | |
376 | - return '<value>' . $this->serializedata($typ, $val, $charsetEncoding) . "</value>\n"; |
|
376 | + return '<value>'.$this->serializedata($typ, $val, $charsetEncoding)."</value>\n"; |
|
377 | 377 | } |
378 | 378 | |
379 | 379 | /** |