Skip to content
Browse files

Merge branch '3.3'

  • Loading branch information...
2 parents 37812ea + 9baacc9 commit 844ec6eabee15768f1e34a8871f6fddfc3d5f602 @sebastianbergmann committed May 27, 2016
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/Report/Crap4j.php
View
8 src/Report/Crap4j.php
@@ -128,15 +128,17 @@ public function process(CodeCoverage $coverage, $target = null, $name = null)
$root->appendChild($stats);
$root->appendChild($methodsNode);
+ $buffer = $document->saveXML();
+
if ($target !== null) {
if (!is_dir(dirname($target))) {
mkdir(dirname($target), 0777, true);
}
- return $document->save($target);
- } else {
- return $document->saveXML();
+ file_put_contents($target, $buffer);
}
+
+ return $buffer;
}
/**

0 comments on commit 844ec6e

Please sign in to comment.
Something went wrong with that request. Please try again.