@@ -82,8 +82,9 @@ private function appendSystemErrors(ProcessResult $processResult, Configuration
8282 }
8383 foreach ($ processResult ->getSystemErrors () as $ systemError ) {
8484 $ filePath = $ configuration ->isReportingWithRealPath () ? $ systemError ->getAbsoluteFilePath () ?? '' : $ systemError ->getRelativeFilePath () ?? '' ;
85- $ xmlError = $ domDocument ->createElement (self ::XML_ELEMENT_ERROR , $ systemError -> getMessage () );
85+ $ xmlError = $ domDocument ->createElement (self ::XML_ELEMENT_ERROR );
8686 $ xmlError ->setAttribute (self ::XML_ATTRIBUTE_TYPE , 'Error ' );
87+ $ xmlError ->appendChild ($ domDocument ->createTextNode ($ systemError ->getMessage ()));
8788 $ xmlTestCase = $ domDocument ->createElement (self ::XML_ELEMENT_TESTCASE );
8889 $ xmlTestCase ->setAttribute (self ::XML_ATTRIBUTE_FILE , $ filePath );
8990 $ xmlTestCase ->setAttribute (self ::XML_ATTRIBUTE_NAME , $ filePath . ': ' . $ systemError ->getLine ());
@@ -101,8 +102,9 @@ private function appendFileDiffs(ProcessResult $processResult, Configuration $co
101102 foreach ($ fileDiffs as $ fileDiff ) {
102103 $ filePath = $ configuration ->isReportingWithRealPath () ? $ fileDiff ->getAbsoluteFilePath () ?? '' : $ fileDiff ->getRelativeFilePath () ?? '' ;
103104 $ rectorClasses = implode (' / ' , $ fileDiff ->getRectorShortClasses ());
104- $ xmlError = $ domDocument ->createElement (self ::XML_ELEMENT_ERROR , $ fileDiff -> getDiff () );
105+ $ xmlError = $ domDocument ->createElement (self ::XML_ELEMENT_ERROR );
105106 $ xmlError ->setAttribute (self ::XML_ATTRIBUTE_TYPE , $ rectorClasses );
107+ $ xmlError ->appendChild ($ domDocument ->createTextNode ($ fileDiff ->getDiff ()));
106108 $ xmlTestCase = $ domDocument ->createElement (self ::XML_ELEMENT_TESTCASE );
107109 $ xmlTestCase ->setAttribute (self ::XML_ATTRIBUTE_FILE , $ filePath );
108110 $ xmlTestCase ->setAttribute (self ::XML_ATTRIBUTE_NAME , $ filePath . ': ' . $ fileDiff ->getFirstLineNumber ());
0 commit comments