Skip to content

Commit

Permalink
Assert that we have a DOMElement here
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Dec 2, 2022
1 parent a653302 commit c5d3542
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\TextUI\XmlConfiguration;

use function assert;
use DOMDocument;
use DOMElement;
use PHPUnit\Util\Xml\SnapshotNodeList;
Expand All @@ -27,6 +28,8 @@ public function migrate(DOMDocument $document): void
}

foreach (SnapshotNodeList::fromNodeList($logging->getElementsByTagName('log')) as $logNode) {
assert($logNode instanceof DOMElement);

switch ($logNode->getAttribute('type')) {
case 'json':
case 'tap':
Expand Down

0 comments on commit c5d3542

Please sign in to comment.