@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | } catch (CliParserException $e) { |
| 136 | 136 | throw new Exception( |
| 137 | 137 | $e->getMessage(), |
| 138 | - (int) $e->getCode(), |
|
| 138 | + (int)$e->getCode(), |
|
| 139 | 139 | $e |
| 140 | 140 | ); |
| 141 | 141 | } |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | |
| 266 | 266 | case '--columns': |
| 267 | 267 | if (is_numeric($option[1])) { |
| 268 | - $columns = (int) $option[1]; |
|
| 268 | + $columns = (int)$option[1]; |
|
| 269 | 269 | } elseif ($option[1] === 'max') { |
| 270 | 270 | $columns = 'max'; |
| 271 | 271 | } |
@@ -506,7 +506,7 @@ discard block |
||
| 506 | 506 | break; |
| 507 | 507 | |
| 508 | 508 | case '--repeat': |
| 509 | - $repeat = (int) $option[1]; |
|
| 509 | + $repeat = (int)$option[1]; |
|
| 510 | 510 | |
| 511 | 511 | break; |
| 512 | 512 | |
@@ -705,7 +705,7 @@ discard block |
||
| 705 | 705 | break; |
| 706 | 706 | |
| 707 | 707 | case '--default-time-limit': |
| 708 | - $defaultTimeLimit = (int) $option[1]; |
|
| 708 | + $defaultTimeLimit = (int)$option[1]; |
|
| 709 | 709 | |
| 710 | 710 | break; |
| 711 | 711 | |
@@ -745,7 +745,7 @@ discard block |
||
| 745 | 745 | break; |
| 746 | 746 | |
| 747 | 747 | case '--random-order-seed': |
| 748 | - $randomOrderSeed = (int) $option[1]; |
|
| 748 | + $randomOrderSeed = (int)$option[1]; |
|
| 749 | 749 | |
| 750 | 750 | break; |
| 751 | 751 | |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | } catch (FrameworkException $e) { |
| 96 | 96 | throw new RuntimeException( |
| 97 | 97 | $e->getMessage(), |
| 98 | - (int) $e->getCode(), |
|
| 98 | + (int)$e->getCode(), |
|
| 99 | 99 | $e |
| 100 | 100 | ); |
| 101 | 101 | } |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | } catch (Throwable $t) { |
| 97 | 97 | throw new RuntimeException( |
| 98 | 98 | $t->getMessage(), |
| 99 | - (int) $t->getCode(), |
|
| 99 | + (int)$t->getCode(), |
|
| 100 | 100 | $t |
| 101 | 101 | ); |
| 102 | 102 | } |
@@ -449,7 +449,7 @@ discard block |
||
| 449 | 449 | } catch (\ReflectionException $e) { |
| 450 | 450 | throw new ReflectionException( |
| 451 | 451 | $e->getMessage(), |
| 452 | - (int) $e->getCode(), |
|
| 452 | + (int)$e->getCode(), |
|
| 453 | 453 | $e |
| 454 | 454 | ); |
| 455 | 455 | } |
@@ -518,7 +518,7 @@ discard block |
||
| 518 | 518 | } catch (\ReflectionException $e) { |
| 519 | 519 | throw new ReflectionException( |
| 520 | 520 | $e->getMessage(), |
| 521 | - (int) $e->getCode(), |
|
| 521 | + (int)$e->getCode(), |
|
| 522 | 522 | $e |
| 523 | 523 | ); |
| 524 | 524 | // @codeCoverageIgnoreEnd |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | } catch (XmlException $e) { |
| 73 | 73 | throw new Exception( |
| 74 | 74 | $e->getMessage(), |
| 75 | - (int) $e->getCode(), |
|
| 75 | + (int)$e->getCode(), |
|
| 76 | 76 | $e |
| 77 | 77 | ); |
| 78 | 78 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | } catch (XmlException $e) { |
| 85 | 85 | throw new Exception( |
| 86 | 86 | $e->getMessage(), |
| 87 | - (int) $e->getCode(), |
|
| 87 | + (int)$e->getCode(), |
|
| 88 | 88 | $e |
| 89 | 89 | ); |
| 90 | 90 | } |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | new File( |
| 119 | 119 | $this->toAbsolutePath( |
| 120 | 120 | $filename, |
| 121 | - (string) $this->getStringAttribute($element, 'outputFile') |
|
| 121 | + (string)$this->getStringAttribute($element, 'outputFile') |
|
| 122 | 122 | ) |
| 123 | 123 | ) |
| 124 | 124 | ); |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | new File( |
| 133 | 133 | $this->toAbsolutePath( |
| 134 | 134 | $filename, |
| 135 | - (string) $this->getStringAttribute($element, 'outputFile') |
|
| 135 | + (string)$this->getStringAttribute($element, 'outputFile') |
|
| 136 | 136 | ) |
| 137 | 137 | ) |
| 138 | 138 | ); |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | new File( |
| 147 | 147 | $this->toAbsolutePath( |
| 148 | 148 | $filename, |
| 149 | - (string) $this->getStringAttribute($element, 'outputFile') |
|
| 149 | + (string)$this->getStringAttribute($element, 'outputFile') |
|
| 150 | 150 | ) |
| 151 | 151 | ) |
| 152 | 152 | ); |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | new File( |
| 161 | 161 | $this->toAbsolutePath( |
| 162 | 162 | $filename, |
| 163 | - (string) $this->getStringAttribute($element, 'outputFile') |
|
| 163 | + (string)$this->getStringAttribute($element, 'outputFile') |
|
| 164 | 164 | ) |
| 165 | 165 | ) |
| 166 | 166 | ); |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | new File( |
| 175 | 175 | $this->toAbsolutePath( |
| 176 | 176 | $filename, |
| 177 | - (string) $this->getStringAttribute($element, 'outputFile') |
|
| 177 | + (string)$this->getStringAttribute($element, 'outputFile') |
|
| 178 | 178 | ) |
| 179 | 179 | ) |
| 180 | 180 | ); |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | new File( |
| 189 | 189 | $this->toAbsolutePath( |
| 190 | 190 | $filename, |
| 191 | - (string) $this->getStringAttribute($element, 'outputFile') |
|
| 191 | + (string)$this->getStringAttribute($element, 'outputFile') |
|
| 192 | 192 | ) |
| 193 | 193 | ) |
| 194 | 194 | ); |
@@ -216,8 +216,8 @@ discard block |
||
| 216 | 216 | foreach ($xpath->query('logging/log') as $log) { |
| 217 | 217 | assert($log instanceof DOMElement); |
| 218 | 218 | |
| 219 | - $type = (string) $log->getAttribute('type'); |
|
| 220 | - $target = (string) $log->getAttribute('target'); |
|
| 219 | + $type = (string)$log->getAttribute('type'); |
|
| 220 | + $target = (string)$log->getAttribute('target'); |
|
| 221 | 221 | |
| 222 | 222 | if (!$target) { |
| 223 | 223 | continue; |
@@ -296,14 +296,14 @@ discard block |
||
| 296 | 296 | private function getElementConfigurationParameters(string $filename, DOMElement $element): Extension |
| 297 | 297 | { |
| 298 | 298 | /** @psalm-var class-string $class */ |
| 299 | - $class = (string) $element->getAttribute('class'); |
|
| 299 | + $class = (string)$element->getAttribute('class'); |
|
| 300 | 300 | $file = ''; |
| 301 | 301 | $arguments = $this->getConfigurationArguments($filename, $element->childNodes); |
| 302 | 302 | |
| 303 | 303 | if ($element->getAttribute('file')) { |
| 304 | 304 | $file = $this->toAbsolutePath( |
| 305 | 305 | $filename, |
| 306 | - (string) $element->getAttribute('file'), |
|
| 306 | + (string)$element->getAttribute('file'), |
|
| 307 | 307 | true |
| 308 | 308 | ); |
| 309 | 309 | } |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | } |
| 373 | 373 | |
| 374 | 374 | if ($argument->tagName === 'file' || $argument->tagName === 'directory') { |
| 375 | - $arguments[] = $this->toAbsolutePath($filename, (string) $argument->textContent); |
|
| 375 | + $arguments[] = $this->toAbsolutePath($filename, (string)$argument->textContent); |
|
| 376 | 376 | } else { |
| 377 | 377 | $arguments[] = Xml::xmlToVariable($argument); |
| 378 | 378 | } |
@@ -445,7 +445,7 @@ discard block |
||
| 445 | 445 | new File( |
| 446 | 446 | $this->toAbsolutePath( |
| 447 | 447 | $filename, |
| 448 | - (string) $this->getStringAttribute($element, 'outputFile') |
|
| 448 | + (string)$this->getStringAttribute($element, 'outputFile') |
|
| 449 | 449 | ) |
| 450 | 450 | ) |
| 451 | 451 | ); |
@@ -459,7 +459,7 @@ discard block |
||
| 459 | 459 | new File( |
| 460 | 460 | $this->toAbsolutePath( |
| 461 | 461 | $filename, |
| 462 | - (string) $this->getStringAttribute($element, 'outputFile') |
|
| 462 | + (string)$this->getStringAttribute($element, 'outputFile') |
|
| 463 | 463 | ) |
| 464 | 464 | ) |
| 465 | 465 | ); |
@@ -473,7 +473,7 @@ discard block |
||
| 473 | 473 | new File( |
| 474 | 474 | $this->toAbsolutePath( |
| 475 | 475 | $filename, |
| 476 | - (string) $this->getStringAttribute($element, 'outputFile') |
|
| 476 | + (string)$this->getStringAttribute($element, 'outputFile') |
|
| 477 | 477 | ) |
| 478 | 478 | ), |
| 479 | 479 | $this->getIntegerAttribute($element, 'threshold', 30) |
@@ -488,7 +488,7 @@ discard block |
||
| 488 | 488 | new Directory( |
| 489 | 489 | $this->toAbsolutePath( |
| 490 | 490 | $filename, |
| 491 | - (string) $this->getStringAttribute($element, 'outputDirectory') |
|
| 491 | + (string)$this->getStringAttribute($element, 'outputDirectory') |
|
| 492 | 492 | ) |
| 493 | 493 | ), |
| 494 | 494 | $this->getIntegerAttribute($element, 'lowUpperBound', 50), |
@@ -504,7 +504,7 @@ discard block |
||
| 504 | 504 | new File( |
| 505 | 505 | $this->toAbsolutePath( |
| 506 | 506 | $filename, |
| 507 | - (string) $this->getStringAttribute($element, 'outputFile') |
|
| 507 | + (string)$this->getStringAttribute($element, 'outputFile') |
|
| 508 | 508 | ) |
| 509 | 509 | ) |
| 510 | 510 | ); |
@@ -518,7 +518,7 @@ discard block |
||
| 518 | 518 | new File( |
| 519 | 519 | $this->toAbsolutePath( |
| 520 | 520 | $filename, |
| 521 | - (string) $this->getStringAttribute($element, 'outputFile') |
|
| 521 | + (string)$this->getStringAttribute($element, 'outputFile') |
|
| 522 | 522 | ) |
| 523 | 523 | ), |
| 524 | 524 | $this->getBooleanAttribute($element, 'showUncoveredFiles', false), |
@@ -534,7 +534,7 @@ discard block |
||
| 534 | 534 | new Directory( |
| 535 | 535 | $this->toAbsolutePath( |
| 536 | 536 | $filename, |
| 537 | - (string) $this->getStringAttribute($element, 'outputDirectory') |
|
| 537 | + (string)$this->getStringAttribute($element, 'outputDirectory') |
|
| 538 | 538 | ) |
| 539 | 539 | ) |
| 540 | 540 | ); |
@@ -585,15 +585,15 @@ discard block |
||
| 585 | 585 | |
| 586 | 586 | if ($element) { |
| 587 | 587 | if ($element->hasAttribute('addUncoveredFilesFromWhitelist')) { |
| 588 | - $includeUncoveredFiles = (bool) $this->getBoolean( |
|
| 589 | - (string) $element->getAttribute('addUncoveredFilesFromWhitelist'), |
|
| 588 | + $includeUncoveredFiles = (bool)$this->getBoolean( |
|
| 589 | + (string)$element->getAttribute('addUncoveredFilesFromWhitelist'), |
|
| 590 | 590 | true |
| 591 | 591 | ); |
| 592 | 592 | } |
| 593 | 593 | |
| 594 | 594 | if ($element->hasAttribute('processUncoveredFilesFromWhitelist')) { |
| 595 | - $processUncoveredFiles = (bool) $this->getBoolean( |
|
| 596 | - (string) $element->getAttribute('processUncoveredFilesFromWhitelist'), |
|
| 595 | + $processUncoveredFiles = (bool)$this->getBoolean( |
|
| 596 | + (string)$element->getAttribute('processUncoveredFilesFromWhitelist'), |
|
| 597 | 597 | false |
| 598 | 598 | ); |
| 599 | 599 | } |
@@ -610,8 +610,8 @@ discard block |
||
| 610 | 610 | foreach ($xpath->query('logging/log') as $log) { |
| 611 | 611 | assert($log instanceof DOMElement); |
| 612 | 612 | |
| 613 | - $type = (string) $log->getAttribute('type'); |
|
| 614 | - $target = (string) $log->getAttribute('target'); |
|
| 613 | + $type = (string)$log->getAttribute('type'); |
|
| 614 | + $target = (string)$log->getAttribute('target'); |
|
| 615 | 615 | |
| 616 | 616 | if (!$target) { |
| 617 | 617 | continue; |
@@ -727,7 +727,7 @@ discard block |
||
| 727 | 727 | foreach ($xpath->query($query) as $directoryNode) { |
| 728 | 728 | assert($directoryNode instanceof DOMElement); |
| 729 | 729 | |
| 730 | - $directoryPath = (string) $directoryNode->textContent; |
|
| 730 | + $directoryPath = (string)$directoryNode->textContent; |
|
| 731 | 731 | |
| 732 | 732 | if (!$directoryPath) { |
| 733 | 733 | continue; |
@@ -735,9 +735,9 @@ discard block |
||
| 735 | 735 | |
| 736 | 736 | $directories[] = new FilterDirectory( |
| 737 | 737 | $this->toAbsolutePath($filename, $directoryPath), |
| 738 | - $directoryNode->hasAttribute('prefix') ? (string) $directoryNode->getAttribute('prefix') : '', |
|
| 739 | - $directoryNode->hasAttribute('suffix') ? (string) $directoryNode->getAttribute('suffix') : '.php', |
|
| 740 | - $directoryNode->hasAttribute('group') ? (string) $directoryNode->getAttribute('group') : 'DEFAULT' |
|
| 738 | + $directoryNode->hasAttribute('prefix') ? (string)$directoryNode->getAttribute('prefix') : '', |
|
| 739 | + $directoryNode->hasAttribute('suffix') ? (string)$directoryNode->getAttribute('suffix') : '.php', |
|
| 740 | + $directoryNode->hasAttribute('group') ? (string)$directoryNode->getAttribute('group') : 'DEFAULT' |
|
| 741 | 741 | ); |
| 742 | 742 | } |
| 743 | 743 | |
@@ -749,7 +749,7 @@ discard block |
||
| 749 | 749 | $files = []; |
| 750 | 750 | |
| 751 | 751 | foreach ($xpath->query($query) as $file) { |
| 752 | - $filePath = (string) $file->textContent; |
|
| 752 | + $filePath = (string)$file->textContent; |
|
| 753 | 753 | |
| 754 | 754 | if ($filePath) { |
| 755 | 755 | $files[] = new File($this->toAbsolutePath($filename, $filePath)); |
@@ -775,11 +775,11 @@ discard block |
||
| 775 | 775 | $exclude = []; |
| 776 | 776 | |
| 777 | 777 | foreach ($xpath->query($root . '/include/group') as $group) { |
| 778 | - $include[] = new Group((string) $group->textContent); |
|
| 778 | + $include[] = new Group((string)$group->textContent); |
|
| 779 | 779 | } |
| 780 | 780 | |
| 781 | 781 | foreach ($xpath->query($root . '/exclude/group') as $group) { |
| 782 | - $exclude[] = new Group((string) $group->textContent); |
|
| 782 | + $exclude[] = new Group((string)$group->textContent); |
|
| 783 | 783 | } |
| 784 | 784 | |
| 785 | 785 | return new Groups( |
@@ -807,8 +807,8 @@ discard block |
||
| 807 | 807 | return $default; |
| 808 | 808 | } |
| 809 | 809 | |
| 810 | - return (bool) $this->getBoolean( |
|
| 811 | - (string) $element->getAttribute($attribute), |
|
| 810 | + return (bool)$this->getBoolean( |
|
| 811 | + (string)$element->getAttribute($attribute), |
|
| 812 | 812 | false |
| 813 | 813 | ); |
| 814 | 814 | } |
@@ -820,7 +820,7 @@ discard block |
||
| 820 | 820 | } |
| 821 | 821 | |
| 822 | 822 | return $this->getInteger( |
| 823 | - (string) $element->getAttribute($attribute), |
|
| 823 | + (string)$element->getAttribute($attribute), |
|
| 824 | 824 | $default |
| 825 | 825 | ); |
| 826 | 826 | } |
@@ -831,13 +831,13 @@ discard block |
||
| 831 | 831 | return null; |
| 832 | 832 | } |
| 833 | 833 | |
| 834 | - return (string) $element->getAttribute($attribute); |
|
| 834 | + return (string)$element->getAttribute($attribute); |
|
| 835 | 835 | } |
| 836 | 836 | |
| 837 | 837 | private function getInteger(string $value, int $default): int |
| 838 | 838 | { |
| 839 | 839 | if (is_numeric($value)) { |
| 840 | - return (int) $value; |
|
| 840 | + return (int)$value; |
|
| 841 | 841 | } |
| 842 | 842 | |
| 843 | 843 | return $default; |
@@ -848,7 +848,7 @@ discard block |
||
| 848 | 848 | $includePaths = []; |
| 849 | 849 | |
| 850 | 850 | foreach ($xpath->query('php/includePath') as $includePath) { |
| 851 | - $path = (string) $includePath->textContent; |
|
| 851 | + $path = (string)$includePath->textContent; |
|
| 852 | 852 | |
| 853 | 853 | if ($path) { |
| 854 | 854 | $includePaths[] = new Directory($this->toAbsolutePath($filename, $path)); |
@@ -861,8 +861,8 @@ discard block |
||
| 861 | 861 | assert($ini instanceof DOMElement); |
| 862 | 862 | |
| 863 | 863 | $iniSettings[] = new IniSetting( |
| 864 | - (string) $ini->getAttribute('name'), |
|
| 865 | - (string) $ini->getAttribute('value') |
|
| 864 | + (string)$ini->getAttribute('name'), |
|
| 865 | + (string)$ini->getAttribute('value') |
|
| 866 | 866 | ); |
| 867 | 867 | } |
| 868 | 868 | |
@@ -871,10 +871,10 @@ discard block |
||
| 871 | 871 | foreach ($xpath->query('php/const') as $const) { |
| 872 | 872 | assert($const instanceof DOMElement); |
| 873 | 873 | |
| 874 | - $value = (string) $const->getAttribute('value'); |
|
| 874 | + $value = (string)$const->getAttribute('value'); |
|
| 875 | 875 | |
| 876 | 876 | $constants[] = new Constant( |
| 877 | - (string) $const->getAttribute('name'), |
|
| 877 | + (string)$const->getAttribute('name'), |
|
| 878 | 878 | $this->getBoolean($value, $value) |
| 879 | 879 | ); |
| 880 | 880 | } |
@@ -894,13 +894,13 @@ discard block |
||
| 894 | 894 | foreach ($xpath->query('php/' . $array) as $var) { |
| 895 | 895 | assert($var instanceof DOMElement); |
| 896 | 896 | |
| 897 | - $name = (string) $var->getAttribute('name'); |
|
| 898 | - $value = (string) $var->getAttribute('value'); |
|
| 897 | + $name = (string)$var->getAttribute('name'); |
|
| 898 | + $value = (string)$var->getAttribute('value'); |
|
| 899 | 899 | $force = false; |
| 900 | 900 | $verbatim = false; |
| 901 | 901 | |
| 902 | 902 | if ($var->hasAttribute('force')) { |
| 903 | - $force = (bool) $this->getBoolean($var->getAttribute('force'), false); |
|
| 903 | + $force = (bool)$this->getBoolean($var->getAttribute('force'), false); |
|
| 904 | 904 | } |
| 905 | 905 | |
| 906 | 906 | if ($var->hasAttribute('verbatim')) { |
@@ -1106,7 +1106,7 @@ discard block |
||
| 1106 | 1106 | $columns = 80; |
| 1107 | 1107 | |
| 1108 | 1108 | if ($document->documentElement->hasAttribute('columns')) { |
| 1109 | - $columns = (string) $document->documentElement->getAttribute('columns'); |
|
| 1109 | + $columns = (string)$document->documentElement->getAttribute('columns'); |
|
| 1110 | 1110 | |
| 1111 | 1111 | if ($columns !== 'max') { |
| 1112 | 1112 | $columns = $this->getInteger($columns, 80); |
@@ -1124,7 +1124,7 @@ discard block |
||
| 1124 | 1124 | $exclude = []; |
| 1125 | 1125 | |
| 1126 | 1126 | foreach ($element->getElementsByTagName('exclude') as $excludeNode) { |
| 1127 | - $excludeFile = (string) $excludeNode->textContent; |
|
| 1127 | + $excludeFile = (string)$excludeNode->textContent; |
|
| 1128 | 1128 | |
| 1129 | 1129 | if ($excludeFile) { |
| 1130 | 1130 | $exclude[] = new File($this->toAbsolutePath($filename, $excludeFile)); |
@@ -1136,7 +1136,7 @@ discard block |
||
| 1136 | 1136 | foreach ($element->getElementsByTagName('directory') as $directoryNode) { |
| 1137 | 1137 | assert($directoryNode instanceof DOMElement); |
| 1138 | 1138 | |
| 1139 | - $directory = (string) $directoryNode->textContent; |
|
| 1139 | + $directory = (string)$directoryNode->textContent; |
|
| 1140 | 1140 | |
| 1141 | 1141 | if (empty($directory)) { |
| 1142 | 1142 | continue; |
@@ -1145,25 +1145,25 @@ discard block |
||
| 1145 | 1145 | $prefix = ''; |
| 1146 | 1146 | |
| 1147 | 1147 | if ($directoryNode->hasAttribute('prefix')) { |
| 1148 | - $prefix = (string) $directoryNode->getAttribute('prefix'); |
|
| 1148 | + $prefix = (string)$directoryNode->getAttribute('prefix'); |
|
| 1149 | 1149 | } |
| 1150 | 1150 | |
| 1151 | 1151 | $suffix = 'Test.php'; |
| 1152 | 1152 | |
| 1153 | 1153 | if ($directoryNode->hasAttribute('suffix')) { |
| 1154 | - $suffix = (string) $directoryNode->getAttribute('suffix'); |
|
| 1154 | + $suffix = (string)$directoryNode->getAttribute('suffix'); |
|
| 1155 | 1155 | } |
| 1156 | 1156 | |
| 1157 | 1157 | $phpVersion = PHP_VERSION; |
| 1158 | 1158 | |
| 1159 | 1159 | if ($directoryNode->hasAttribute('phpVersion')) { |
| 1160 | - $phpVersion = (string) $directoryNode->getAttribute('phpVersion'); |
|
| 1160 | + $phpVersion = (string)$directoryNode->getAttribute('phpVersion'); |
|
| 1161 | 1161 | } |
| 1162 | 1162 | |
| 1163 | 1163 | $phpVersionOperator = new VersionComparisonOperator('>='); |
| 1164 | 1164 | |
| 1165 | 1165 | if ($directoryNode->hasAttribute('phpVersionOperator')) { |
| 1166 | - $phpVersionOperator = new VersionComparisonOperator((string) $directoryNode->getAttribute('phpVersionOperator')); |
|
| 1166 | + $phpVersionOperator = new VersionComparisonOperator((string)$directoryNode->getAttribute('phpVersionOperator')); |
|
| 1167 | 1167 | } |
| 1168 | 1168 | |
| 1169 | 1169 | $directories[] = new TestDirectory( |
@@ -1180,7 +1180,7 @@ discard block |
||
| 1180 | 1180 | foreach ($element->getElementsByTagName('file') as $fileNode) { |
| 1181 | 1181 | assert($fileNode instanceof DOMElement); |
| 1182 | 1182 | |
| 1183 | - $file = (string) $fileNode->textContent; |
|
| 1183 | + $file = (string)$fileNode->textContent; |
|
| 1184 | 1184 | |
| 1185 | 1185 | if (empty($file)) { |
| 1186 | 1186 | continue; |
@@ -1189,13 +1189,13 @@ discard block |
||
| 1189 | 1189 | $phpVersion = PHP_VERSION; |
| 1190 | 1190 | |
| 1191 | 1191 | if ($fileNode->hasAttribute('phpVersion')) { |
| 1192 | - $phpVersion = (string) $fileNode->getAttribute('phpVersion'); |
|
| 1192 | + $phpVersion = (string)$fileNode->getAttribute('phpVersion'); |
|
| 1193 | 1193 | } |
| 1194 | 1194 | |
| 1195 | 1195 | $phpVersionOperator = new VersionComparisonOperator('>='); |
| 1196 | 1196 | |
| 1197 | 1197 | if ($fileNode->hasAttribute('phpVersionOperator')) { |
| 1198 | - $phpVersionOperator = new VersionComparisonOperator((string) $fileNode->getAttribute('phpVersionOperator')); |
|
| 1198 | + $phpVersionOperator = new VersionComparisonOperator((string)$fileNode->getAttribute('phpVersionOperator')); |
|
| 1199 | 1199 | } |
| 1200 | 1200 | |
| 1201 | 1201 | $files[] = new TestFile( |
@@ -1206,7 +1206,7 @@ discard block |
||
| 1206 | 1206 | } |
| 1207 | 1207 | |
| 1208 | 1208 | $testSuites[] = new TestSuiteConfiguration( |
| 1209 | - (string) $element->getAttribute('name'), |
|
| 1209 | + (string)$element->getAttribute('name'), |
|
| 1210 | 1210 | TestDirectoryCollection::fromArray($directories), |
| 1211 | 1211 | TestFileCollection::fromArray($files), |
| 1212 | 1212 | FileCollection::fromArray($exclude) |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | throw new Exception('Cache result file is not configured'); |
| 352 | 352 | } |
| 353 | 353 | |
| 354 | - return (string) $this->cacheResultFile; |
|
| 354 | + return (string)$this->cacheResultFile; |
|
| 355 | 355 | } |
| 356 | 356 | |
| 357 | 357 | public function columns() |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | throw new Exception('Bootstrap script is not configured'); |
| 427 | 427 | } |
| 428 | 428 | |
| 429 | - return (string) $this->bootstrap; |
|
| 429 | + return (string)$this->bootstrap; |
|
| 430 | 430 | } |
| 431 | 431 | |
| 432 | 432 | public function processIsolation(): bool |
@@ -511,7 +511,7 @@ discard block |
||
| 511 | 511 | throw new Exception('Extensions directory is not configured'); |
| 512 | 512 | } |
| 513 | 513 | |
| 514 | - return (string) $this->extensionsDirectory; |
|
| 514 | + return (string)$this->extensionsDirectory; |
|
| 515 | 515 | } |
| 516 | 516 | |
| 517 | 517 | /** |
@@ -535,7 +535,7 @@ discard block |
||
| 535 | 535 | throw new Exception('TestSuiteLoader class is not configured'); |
| 536 | 536 | } |
| 537 | 537 | |
| 538 | - return (string) $this->testSuiteLoaderClass; |
|
| 538 | + return (string)$this->testSuiteLoaderClass; |
|
| 539 | 539 | } |
| 540 | 540 | |
| 541 | 541 | /** |
@@ -559,7 +559,7 @@ discard block |
||
| 559 | 559 | throw new Exception('TestSuiteLoader sourcecode file is not configured'); |
| 560 | 560 | } |
| 561 | 561 | |
| 562 | - return (string) $this->testSuiteLoaderFile; |
|
| 562 | + return (string)$this->testSuiteLoaderFile; |
|
| 563 | 563 | } |
| 564 | 564 | |
| 565 | 565 | /** |
@@ -579,7 +579,7 @@ discard block |
||
| 579 | 579 | throw new Exception('ResultPrinter class is not configured'); |
| 580 | 580 | } |
| 581 | 581 | |
| 582 | - return (string) $this->printerClass; |
|
| 582 | + return (string)$this->printerClass; |
|
| 583 | 583 | } |
| 584 | 584 | |
| 585 | 585 | /** |
@@ -599,7 +599,7 @@ discard block |
||
| 599 | 599 | throw new Exception('ResultPrinter sourcecode file is not configured'); |
| 600 | 600 | } |
| 601 | 601 | |
| 602 | - return (string) $this->printerFile; |
|
| 602 | + return (string)$this->printerFile; |
|
| 603 | 603 | } |
| 604 | 604 | |
| 605 | 605 | public function beStrictAboutChangesToGlobalState(): bool |
@@ -674,7 +674,7 @@ discard block |
||
| 674 | 674 | throw new Exception('Default test suite is not configured'); |
| 675 | 675 | } |
| 676 | 676 | |
| 677 | - return (string) $this->defaultTestSuite; |
|
| 677 | + return (string)$this->defaultTestSuite; |
|
| 678 | 678 | } |
| 679 | 679 | |
| 680 | 680 | public function executionOrder(): int |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | $value = $iniSetting->value(); |
| 64 | 64 | |
| 65 | 65 | if (defined($value)) { |
| 66 | - $value = (string) constant($value); |
|
| 66 | + $value = (string)constant($value); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | ini_set($iniSetting->name(), $value); |
@@ -243,7 +243,7 @@ |
||
| 243 | 243 | $arg = Color::colorize('fg-green', str_pad($option['arg'], $this->maxArgLength)); |
| 244 | 244 | $arg = preg_replace_callback( |
| 245 | 245 | '/(<[^>]+>)/', |
| 246 | - static function ($matches) { |
|
| 246 | + static function($matches) { |
|
| 247 | 247 | return Color::colorize('fg-cyan', $matches[0]); |
| 248 | 248 | }, |
| 249 | 249 | $arg |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | { |
| 258 | 258 | if ($this->numTests == -1) { |
| 259 | 259 | $this->numTests = count($suite); |
| 260 | - $this->numTestsWidth = strlen((string) $this->numTests); |
|
| 260 | + $this->numTestsWidth = strlen((string)$this->numTests); |
|
| 261 | 261 | $this->maxColumn = $this->numberOfColumns - strlen(' / (XXX%)') - (2 * $this->numTestsWidth); |
| 262 | 262 | } |
| 263 | 263 | } |
@@ -371,7 +371,7 @@ discard block |
||
| 371 | 371 | { |
| 372 | 372 | $e = $defect->thrownException(); |
| 373 | 373 | |
| 374 | - $this->write((string) $e); |
|
| 374 | + $this->write((string)$e); |
|
| 375 | 375 | |
| 376 | 376 | while ($e = $e->getPrevious()) { |
| 377 | 377 | $this->write("\nCaused by\n" . $e); |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | } catch (ReflectionException $e) { |
| 77 | 77 | throw new Exception( |
| 78 | 78 | $e->getMessage(), |
| 79 | - (int) $e->getCode(), |
|
| 79 | + (int)$e->getCode(), |
|
| 80 | 80 | $e |
| 81 | 81 | ); |
| 82 | 82 | } |