@@ -22,7 +22,7 @@ |
||
22 | 22 | public static function safeMatch(string $pattern, string $subject) |
23 | 23 | { |
24 | 24 | return ErrorHandler::invokeIgnoringWarnings( |
25 | - static function () use ($pattern, $subject) { |
|
25 | + static function() use ($pattern, $subject) { |
|
26 | 26 | return preg_match($pattern, $subject); |
27 | 27 | } |
28 | 28 | ); |
@@ -82,8 +82,8 @@ |
||
82 | 82 | // But EMPTY objects MUST remain empty objects. (Otherwise we will |
83 | 83 | // re-encode it as a JSON array rather than a JSON object.) |
84 | 84 | // See #2919. |
85 | - if (is_object($json) && count((array) $json) > 0) { |
|
86 | - $json = (array) $json; |
|
85 | + if (is_object($json) && count((array)$json) > 0) { |
|
86 | + $json = (array)$json; |
|
87 | 87 | } else { |
88 | 88 | return; |
89 | 89 | } |
@@ -660,7 +660,7 @@ |
||
660 | 660 | $mode, |
661 | 661 | $element |
662 | 662 | ), |
663 | - (int) $e->getCode(), |
|
663 | + (int)$e->getCode(), |
|
664 | 664 | $e |
665 | 665 | ); |
666 | 666 | } |
@@ -101,7 +101,7 @@ |
||
101 | 101 | $result .= sprintf( |
102 | 102 | '@ini_set(%s, %s);' . "\n", |
103 | 103 | self::exportVariable($key), |
104 | - self::exportVariable((string) $value) |
|
104 | + self::exportVariable((string)$value) |
|
105 | 105 | ); |
106 | 106 | } |
107 | 107 |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | /** |
276 | 276 | * @throws ErrorException |
277 | 277 | */ |
278 | - static function ($errno, $errstr, $errfile, $errline): void { |
|
278 | + static function($errno, $errstr, $errfile, $errline): void { |
|
279 | 279 | throw new ErrorException($errstr, $errno, $errno, $errfile, $errline); |
280 | 280 | } |
281 | 281 | ); |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | if ($exception instanceof __PHP_Incomplete_Class) { |
393 | 393 | $exceptionArray = []; |
394 | 394 | |
395 | - foreach ((array) $exception as $key => $value) { |
|
395 | + foreach ((array)$exception as $key => $value) { |
|
396 | 396 | $key = substr($key, strrpos($key, "\0") + 1); |
397 | 397 | $exceptionArray[$key] = $value; |
398 | 398 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | $last = count($path) - 1; |
117 | 117 | $path[$last] = preg_replace_callback( |
118 | 118 | '/([\-_\.]+|phpt$)/', |
119 | - static function ($matches) { |
|
119 | + static function($matches) { |
|
120 | 120 | return self::dim($matches[0]); |
121 | 121 | }, |
122 | 122 | $path[$last] |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | { |
140 | 140 | $replaceMap = $visualizeEOL ? self::WHITESPACE_EOL_MAP : self::WHITESPACE_MAP; |
141 | 141 | |
142 | - return preg_replace_callback('/\s+/', static function ($matches) use ($replaceMap) { |
|
142 | + return preg_replace_callback('/\s+/', static function($matches) use ($replaceMap) { |
|
143 | 143 | return self::dim(strtr($matches[0], $replaceMap)); |
144 | 144 | }, $buffer); |
145 | 145 | } |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | } |
297 | 297 | |
298 | 298 | foreach ($params as $key => $value) { |
299 | - $escapedValue = self::escapeValue((string) $value); |
|
299 | + $escapedValue = self::escapeValue((string)$value); |
|
300 | 300 | $this->write(" {$key}='{$escapedValue}'"); |
301 | 301 | } |
302 | 302 | |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | } catch (ReflectionException $e) { |
375 | 375 | throw new Exception( |
376 | 376 | $e->getMessage(), |
377 | - (int) $e->getCode(), |
|
377 | + (int)$e->getCode(), |
|
378 | 378 | $e |
379 | 379 | ); |
380 | 380 | } |
@@ -386,6 +386,6 @@ discard block |
||
386 | 386 | */ |
387 | 387 | private static function toMilliseconds(float $time): int |
388 | 388 | { |
389 | - return (int) round($time * 1000); |
|
389 | + return (int)round($time * 1000); |
|
390 | 390 | } |
391 | 391 | } |
@@ -226,32 +226,32 @@ discard block |
||
226 | 226 | { |
227 | 227 | $this->testSuites[$this->testSuiteLevel]->setAttribute( |
228 | 228 | 'tests', |
229 | - (string) $this->testSuiteTests[$this->testSuiteLevel] |
|
229 | + (string)$this->testSuiteTests[$this->testSuiteLevel] |
|
230 | 230 | ); |
231 | 231 | |
232 | 232 | $this->testSuites[$this->testSuiteLevel]->setAttribute( |
233 | 233 | 'assertions', |
234 | - (string) $this->testSuiteAssertions[$this->testSuiteLevel] |
|
234 | + (string)$this->testSuiteAssertions[$this->testSuiteLevel] |
|
235 | 235 | ); |
236 | 236 | |
237 | 237 | $this->testSuites[$this->testSuiteLevel]->setAttribute( |
238 | 238 | 'errors', |
239 | - (string) $this->testSuiteErrors[$this->testSuiteLevel] |
|
239 | + (string)$this->testSuiteErrors[$this->testSuiteLevel] |
|
240 | 240 | ); |
241 | 241 | |
242 | 242 | $this->testSuites[$this->testSuiteLevel]->setAttribute( |
243 | 243 | 'warnings', |
244 | - (string) $this->testSuiteWarnings[$this->testSuiteLevel] |
|
244 | + (string)$this->testSuiteWarnings[$this->testSuiteLevel] |
|
245 | 245 | ); |
246 | 246 | |
247 | 247 | $this->testSuites[$this->testSuiteLevel]->setAttribute( |
248 | 248 | 'failures', |
249 | - (string) $this->testSuiteFailures[$this->testSuiteLevel] |
|
249 | + (string)$this->testSuiteFailures[$this->testSuiteLevel] |
|
250 | 250 | ); |
251 | 251 | |
252 | 252 | $this->testSuites[$this->testSuiteLevel]->setAttribute( |
253 | 253 | 'skipped', |
254 | - (string) $this->testSuiteSkipped[$this->testSuiteLevel] |
|
254 | + (string)$this->testSuiteSkipped[$this->testSuiteLevel] |
|
255 | 255 | ); |
256 | 256 | |
257 | 257 | $this->testSuites[$this->testSuiteLevel]->setAttribute( |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | } catch (ReflectionException $e) { |
293 | 293 | throw new Exception( |
294 | 294 | $e->getMessage(), |
295 | - (int) $e->getCode(), |
|
295 | + (int)$e->getCode(), |
|
296 | 296 | $e |
297 | 297 | ); |
298 | 298 | } |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | } catch (ReflectionException $e) { |
308 | 308 | throw new Exception( |
309 | 309 | $e->getMessage(), |
310 | - (int) $e->getCode(), |
|
310 | + (int)$e->getCode(), |
|
311 | 311 | $e |
312 | 312 | ); |
313 | 313 | } |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | $testCase->setAttribute('class', $class->getName()); |
317 | 317 | $testCase->setAttribute('classname', str_replace('\\', '.', $class->getName())); |
318 | 318 | $testCase->setAttribute('file', $class->getFileName()); |
319 | - $testCase->setAttribute('line', (string) $method->getStartLine()); |
|
319 | + $testCase->setAttribute('line', (string)$method->getStartLine()); |
|
320 | 320 | } |
321 | 321 | |
322 | 322 | $this->currentTestCase = $testCase; |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | |
338 | 338 | $this->currentTestCase->setAttribute( |
339 | 339 | 'assertions', |
340 | - (string) $numAssertions |
|
340 | + (string)$numAssertions |
|
341 | 341 | ); |
342 | 342 | |
343 | 343 | $this->currentTestCase->setAttribute( |
@@ -28,7 +28,7 @@ |
||
28 | 28 | public function generate(FilterConfiguration $filter): string |
29 | 29 | { |
30 | 30 | $files = array_map( |
31 | - static function ($item) { |
|
31 | + static function($item) { |
|
32 | 32 | return sprintf( |
33 | 33 | " '%s'", |
34 | 34 | $item |