Skip to content

Commit 61b958f

Browse files
Merge branch '9.6' into 10.5
2 parents a312b44 + 0d69cad commit 61b958f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/TextUI/Configuration/Xml/Loader.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
use function trim;
2727
use DOMDocument;
2828
use DOMElement;
29+
use DOMNode;
2930
use DOMXPath;
3031
use PHPUnit\Runner\TestSuiteSorter;
3132
use PHPUnit\Runner\Version;
@@ -514,6 +515,8 @@ private function readFilterFiles(string $filename, DOMXPath $xpath, string $quer
514515
$files = [];
515516

516517
foreach ($xpath->query($query) as $file) {
518+
assert($file instanceof DOMNode);
519+
517520
$filePath = $file->textContent;
518521

519522
if ($filePath) {
@@ -530,10 +533,14 @@ private function groups(DOMXPath $xpath): Groups
530533
$exclude = [];
531534

532535
foreach ($xpath->query('groups/include/group') as $group) {
536+
assert($group instanceof DOMNode);
537+
533538
$include[] = new Group($group->textContent);
534539
}
535540

536541
foreach ($xpath->query('groups/exclude/group') as $group) {
542+
assert($group instanceof DOMNode);
543+
537544
$exclude[] = new Group($group->textContent);
538545
}
539546

@@ -599,6 +606,8 @@ private function php(string $filename, DOMXPath $xpath): Php
599606
$includePaths = [];
600607

601608
foreach ($xpath->query('php/includePath') as $includePath) {
609+
assert($includePath instanceof DOMNode);
610+
602611
$path = $includePath->textContent;
603612

604613
if ($path) {

0 commit comments

Comments
 (0)