Skip to content

Commit f57a777

Browse files
Closes #1094
1 parent cd268c6 commit f57a777

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

ChangeLog-12.3.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt
44

55
## [12.3.8] - 2025-MM-DD
66

7+
### Fixed
8+
79
* [#1092](https://github.com/sebastianbergmann/php-code-coverage/issues/1092): Error in `DOMDocument::saveXML()` is not handled
10+
* [#1094](https://github.com/sebastianbergmann/php-code-coverage/issues/1094): No branch and path coverage in HTML report
811

912
## [12.3.7] - 2025-09-10
1013

src/Report/Html/Facade.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,32 +41,33 @@ public function __construct(string $generator = '', ?Colors $colors = null, ?Thr
4141

4242
public function process(CodeCoverage $coverage, string $target): void
4343
{
44-
$target = $this->directory($target);
45-
$report = $coverage->getReport();
46-
$date = date('D M j G:i:s T Y');
44+
$target = $this->directory($target);
45+
$report = $coverage->getReport();
46+
$date = date('D M j G:i:s T Y');
47+
$hasBranchCoverage = $coverage->getData(true)->functionCoverage() !== [];
4748

4849
$dashboard = new Dashboard(
4950
$this->templatePath,
5051
$this->generator,
5152
$date,
5253
$this->thresholds,
53-
$coverage->collectsBranchAndPathCoverage(),
54+
$hasBranchCoverage,
5455
);
5556

5657
$directory = new Directory(
5758
$this->templatePath,
5859
$this->generator,
5960
$date,
6061
$this->thresholds,
61-
$coverage->collectsBranchAndPathCoverage(),
62+
$hasBranchCoverage,
6263
);
6364

6465
$file = new File(
6566
$this->templatePath,
6667
$this->generator,
6768
$date,
6869
$this->thresholds,
69-
$coverage->collectsBranchAndPathCoverage(),
70+
$hasBranchCoverage,
7071
);
7172

7273
$directory->render($report, $target . 'index.html');

0 commit comments

Comments
 (0)