Skip to content

Commit 8803324

Browse files
croenschmmoll
authored andcommitted
IssueXML.php: skip DOCTYPE (fixes cobertura)
skips '<!DOCTYPE coverage SYSTEM ...' (cobertura) and uses the following element instead
1 parent 3824d02 commit 8803324

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

phpstan_baseline.neon

-5
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ parameters:
2525
count: 1
2626
path: src/PHPCodeBrowser/IssueXML.php
2727

28-
-
29-
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
30-
count: 1
31-
path: src/PHPCodeBrowser/IssueXML.php
32-
3328
-
3429
message: "#^Only booleans are allowed in a negated boolean, string given\\.$#"
3530
count: 1

src/PHPCodeBrowser/IssueXML.php

+5
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
namespace PHPCodeBrowser;
5757

5858
use DOMDocument;
59+
use DOMDocumentType;
5960
use DOMNode;
6061
use DOMNodeList;
6162
use DOMXPath;
@@ -155,6 +156,10 @@ public function addDirectory(string $directory): IssueXML
155156
public function addXMLFile(DOMDocument $domDocument): void
156157
{
157158
foreach ($domDocument->childNodes as $node) {
159+
if ($node instanceof DOMDocumentType) {
160+
continue;
161+
}
162+
158163
$this->documentElement->appendChild($this->importNode($node, true));
159164
}
160165
}

0 commit comments

Comments
 (0)