@@ -214,14 +214,14 @@ private function extensions(string $filename, DOMXPath $xpath): ExtensionCollect
214
214
private function getElementConfigurationParameters (string $ filename , DOMElement $ element ): Extension
215
215
{
216
216
/** @psalm-var class-string $class */
217
- $ class = ( string ) $ element ->getAttribute ('class ' );
217
+ $ class = $ element ->getAttribute ('class ' );
218
218
$ file = '' ;
219
219
$ arguments = $ this ->getConfigurationArguments ($ filename , $ element ->childNodes );
220
220
221
221
if ($ element ->getAttribute ('file ' )) {
222
222
$ file = $ this ->toAbsolutePath (
223
223
$ filename ,
224
- ( string ) $ element ->getAttribute ('file ' ),
224
+ $ element ->getAttribute ('file ' ),
225
225
true
226
226
);
227
227
}
@@ -555,7 +555,7 @@ private function getBooleanAttribute(DOMElement $element, string $attribute, boo
555
555
}
556
556
557
557
return (bool ) $ this ->getBoolean (
558
- ( string ) $ element ->getAttribute ($ attribute ),
558
+ $ element ->getAttribute ($ attribute ),
559
559
false
560
560
);
561
561
}
@@ -567,7 +567,7 @@ private function getIntegerAttribute(DOMElement $element, string $attribute, int
567
567
}
568
568
569
569
return $ this ->getInteger (
570
- ( string ) $ element ->getAttribute ($ attribute ),
570
+ $ element ->getAttribute ($ attribute ),
571
571
$ default
572
572
);
573
573
}
@@ -578,7 +578,7 @@ private function getStringAttribute(DOMElement $element, string $attribute, ?str
578
578
return $ default ?? null ;
579
579
}
580
580
581
- return ( string ) $ element ->getAttribute ($ attribute );
581
+ return $ element ->getAttribute ($ attribute );
582
582
}
583
583
584
584
private function getInteger (string $ value , int $ default ): int
@@ -608,8 +608,8 @@ private function php(string $filename, DOMXPath $xpath): Php
608
608
assert ($ ini instanceof DOMElement);
609
609
610
610
$ iniSettings [] = new IniSetting (
611
- ( string ) $ ini ->getAttribute ('name ' ),
612
- ( string ) $ ini ->getAttribute ('value ' )
611
+ $ ini ->getAttribute ('name ' ),
612
+ $ ini ->getAttribute ('value ' )
613
613
);
614
614
}
615
615
@@ -618,10 +618,10 @@ private function php(string $filename, DOMXPath $xpath): Php
618
618
foreach ($ xpath ->query ('php/const ' ) as $ const ) {
619
619
assert ($ const instanceof DOMElement);
620
620
621
- $ value = ( string ) $ const ->getAttribute ('value ' );
621
+ $ value = $ const ->getAttribute ('value ' );
622
622
623
623
$ constants [] = new Constant (
624
- ( string ) $ const ->getAttribute ('name ' ),
624
+ $ const ->getAttribute ('name ' ),
625
625
$ this ->getBoolean ($ value , $ value )
626
626
);
627
627
}
@@ -641,8 +641,8 @@ private function php(string $filename, DOMXPath $xpath): Php
641
641
foreach ($ xpath ->query ('php/ ' . $ array ) as $ var ) {
642
642
assert ($ var instanceof DOMElement);
643
643
644
- $ name = ( string ) $ var ->getAttribute ('name ' );
645
- $ value = ( string ) $ var ->getAttribute ('value ' );
644
+ $ name = $ var ->getAttribute ('name ' );
645
+ $ value = $ var ->getAttribute ('value ' );
646
646
$ force = false ;
647
647
$ verbatim = false ;
648
648
@@ -890,25 +890,25 @@ private function testSuite(string $filename, DOMXPath $xpath): TestSuiteCollecti
890
890
$ prefix = '' ;
891
891
892
892
if ($ directoryNode ->hasAttribute ('prefix ' )) {
893
- $ prefix = ( string ) $ directoryNode ->getAttribute ('prefix ' );
893
+ $ prefix = $ directoryNode ->getAttribute ('prefix ' );
894
894
}
895
895
896
896
$ suffix = 'Test.php ' ;
897
897
898
898
if ($ directoryNode ->hasAttribute ('suffix ' )) {
899
- $ suffix = ( string ) $ directoryNode ->getAttribute ('suffix ' );
899
+ $ suffix = $ directoryNode ->getAttribute ('suffix ' );
900
900
}
901
901
902
902
$ phpVersion = PHP_VERSION ;
903
903
904
904
if ($ directoryNode ->hasAttribute ('phpVersion ' )) {
905
- $ phpVersion = ( string ) $ directoryNode ->getAttribute ('phpVersion ' );
905
+ $ phpVersion = $ directoryNode ->getAttribute ('phpVersion ' );
906
906
}
907
907
908
908
$ phpVersionOperator = new VersionComparisonOperator ('>= ' );
909
909
910
910
if ($ directoryNode ->hasAttribute ('phpVersionOperator ' )) {
911
- $ phpVersionOperator = new VersionComparisonOperator (( string ) $ directoryNode ->getAttribute ('phpVersionOperator ' ));
911
+ $ phpVersionOperator = new VersionComparisonOperator ($ directoryNode ->getAttribute ('phpVersionOperator ' ));
912
912
}
913
913
914
914
$ directories [] = new TestDirectory (
@@ -934,13 +934,13 @@ private function testSuite(string $filename, DOMXPath $xpath): TestSuiteCollecti
934
934
$ phpVersion = PHP_VERSION ;
935
935
936
936
if ($ fileNode ->hasAttribute ('phpVersion ' )) {
937
- $ phpVersion = ( string ) $ fileNode ->getAttribute ('phpVersion ' );
937
+ $ phpVersion = $ fileNode ->getAttribute ('phpVersion ' );
938
938
}
939
939
940
940
$ phpVersionOperator = new VersionComparisonOperator ('>= ' );
941
941
942
942
if ($ fileNode ->hasAttribute ('phpVersionOperator ' )) {
943
- $ phpVersionOperator = new VersionComparisonOperator (( string ) $ fileNode ->getAttribute ('phpVersionOperator ' ));
943
+ $ phpVersionOperator = new VersionComparisonOperator ($ fileNode ->getAttribute ('phpVersionOperator ' ));
944
944
}
945
945
946
946
$ files [] = new TestFile (
@@ -951,7 +951,7 @@ private function testSuite(string $filename, DOMXPath $xpath): TestSuiteCollecti
951
951
}
952
952
953
953
$ testSuites [] = new TestSuiteConfiguration (
954
- ( string ) $ element ->getAttribute ('name ' ),
954
+ $ element ->getAttribute ('name ' ),
955
955
TestDirectoryCollection::fromArray ($ directories ),
956
956
TestFileCollection::fromArray ($ files ),
957
957
FileCollection::fromArray ($ exclude )
0 commit comments