Skip to content

Commit c5d3542

Browse files
Assert that we have a DOMElement here
1 parent a653302 commit c5d3542

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/TextUI/XmlConfiguration/Migration/Migrations/RemoveLogTypes.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010
namespace PHPUnit\TextUI\XmlConfiguration;
1111

12+
use function assert;
1213
use DOMDocument;
1314
use DOMElement;
1415
use PHPUnit\Util\Xml\SnapshotNodeList;
@@ -27,6 +28,8 @@ public function migrate(DOMDocument $document): void
2728
}
2829

2930
foreach (SnapshotNodeList::fromNodeList($logging->getElementsByTagName('log')) as $logNode) {
31+
assert($logNode instanceof DOMElement);
32+
3033
switch ($logNode->getAttribute('type')) {
3134
case 'json':
3235
case 'tap':

0 commit comments

Comments
 (0)