@@ -48,12 +48,9 @@ final class Facade
4848 private Project $ project ;
4949 private readonly string $ phpUnitVersion ;
5050
51- protected readonly XMLWriter $ xmlWriter ;
52-
5351 public function __construct (string $ version )
5452 {
5553 $ this ->phpUnitVersion = $ version ;
56- $ this ->xmlWriter = new XMLWriter ();
5754 }
5855
5956 /**
@@ -70,9 +67,10 @@ public function process(CodeCoverage $coverage, string $target): void
7067
7168 $ report = $ coverage ->getReport ();
7269
73- $ this ->xmlWriter ->openUri ($ this ->targetFilePath ('index ' ));
70+ $ writer = new XMLWriter ();
71+ $ writer ->openUri ($ this ->targetFilePath ('index ' ));
7472 $ this ->project = new Project (
75- $ this -> xmlWriter ,
73+ $ writer ,
7674 $ coverage ->getReport ()->name (),
7775 );
7876
@@ -159,8 +157,9 @@ private function processFile(FileNode $file, Directory $context): void
159157 strlen ($ this ->project ->projectSourceDirectory ()),
160158 );
161159
162- $ this ->xmlWriter ->openUri ($ this ->targetFilePath ($ file ->id ()));
163- $ fileReport = new Report ($ this ->xmlWriter , $ path );
160+ $ writer = new XMLWriter ();
161+ $ writer ->openUri ($ this ->targetFilePath ($ file ->id ()));
162+ $ fileReport = new Report ($ writer , $ path );
164163
165164 $ this ->setTotals ($ file , $ fileReport ->totals ());
166165
0 commit comments