Skip to content

Commit

Permalink
Merge branch '10.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Mar 6, 2023
2 parents 117fa19 + 35c14ec commit d0ddca0
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 6 deletions.
7 changes: 7 additions & 0 deletions ChangeLog.md
Expand Up @@ -8,6 +8,12 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt

* [#982](https://github.com/sebastianbergmann/php-code-coverage/issues/982): Add option to ignore lines from code coverage

## [10.0.2] - 2023-MM-DD

### Changed

* Improved the legend on the file pages of the HTML code coverage report

## [10.0.1] - 2023-02-25

### Fixed
Expand All @@ -33,5 +39,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt
* This component no longer supports Xdebug 2

[10.1.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/10.0...main
[10.0.2]: https://github.com/sebastianbergmann/php-code-coverage/compare/10.0.1...10.0
[10.0.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/10.0.0...10.0.1
[10.0.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2...10.0.0
2 changes: 1 addition & 1 deletion src/Report/Html/Renderer/File.php
Expand Up @@ -125,7 +125,7 @@ public function render(FileNode $node, string $file): void
[
'items' => $this->renderItems($node),
'lines' => $this->renderSourceWithLineCoverage($node),
'legend' => '<p><span class="success"><strong>Executed</strong></span><span class="danger"><strong>Not Executed</strong></span><span class="warning"><strong>Dead Code</strong></span></p>',
'legend' => '<p><span class="legend covered-by-small-tests">Covered by small (and larger) tests</span><span class="legend covered-by-medium-tests">Covered by medium (and large) tests</span><span class="legend covered-by-large-tests">Covered by large tests (and tests of unknown size)</span><span class="legend not-covered">Not covered</span><span class="legend not-coverable">Not coverable</span></p>',
'structure' => '',
]
);
Expand Down
28 changes: 28 additions & 0 deletions src/Report/Html/Renderer/Template/css/style.css
Expand Up @@ -128,3 +128,31 @@ table + .structure-heading {
border-top: 1px solid lightgrey;
padding-top: 0.5em;
}

.legend {
font-weight: bold;
margin-right: 2px;
padding-left: 10px;
padding-right: 10px;
text-align: center;
}

.covered-by-small-tests {
background-color: #99cb84;
}

.covered-by-medium-tests {
background-color: #c3e3b5;
}

.covered-by-large-tests {
background-color: #dff0d8;
}

.not-covered {
background-color: #f2dede;
}

.not-coverable {
background-color: #fcf8e3;
}
Expand Up @@ -235,7 +235,7 @@
<footer>
<hr/>
<h4>Legend</h4>
<p><span class="success"><strong>Executed</strong></span><span class="danger"><strong>Not Executed</strong></span><span class="warning"><strong>Dead Code</strong></span></p>
<p><span class="legend covered-by-small-tests">Covered by small (and larger) tests</span><span class="legend covered-by-medium-tests">Covered by medium (and large) tests</span><span class="legend covered-by-large-tests">Covered by large tests (and tests of unknown size)</span><span class="legend not-covered">Not covered</span><span class="legend not-coverable">Not coverable</span></p>
<p>
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage %s</a> using <a href="%s" target="_top">%s</a> at %s.</small>
</p>
Expand Down
Expand Up @@ -154,7 +154,7 @@
<footer>
<hr/>
<h4>Legend</h4>
<p><span class="success"><strong>Executed</strong></span><span class="danger"><strong>Not Executed</strong></span><span class="warning"><strong>Dead Code</strong></span></p>
<p><span class="legend covered-by-small-tests">Covered by small (and larger) tests</span><span class="legend covered-by-medium-tests">Covered by medium (and large) tests</span><span class="legend covered-by-large-tests">Covered by large tests (and tests of unknown size)</span><span class="legend not-covered">Not covered</span><span class="legend not-coverable">Not coverable</span></p>
<p>
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage %s</a> using <a href="%s" target="_top">%s</a> at %s.</small>
</p>
Expand Down
Expand Up @@ -185,7 +185,7 @@
<footer>
<hr/>
<h4>Legend</h4>
<p><span class="success"><strong>Executed</strong></span><span class="danger"><strong>Not Executed</strong></span><span class="warning"><strong>Dead Code</strong></span></p>
<p><span class="legend covered-by-small-tests">Covered by small (and larger) tests</span><span class="legend covered-by-medium-tests">Covered by medium (and large) tests</span><span class="legend covered-by-large-tests">Covered by large tests (and tests of unknown size)</span><span class="legend not-covered">Not covered</span><span class="legend not-coverable">Not coverable</span></p>
<p>
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage %s</a> using <a href="%s" target="_top">%s</a> at %s.</small>
</p>
Expand Down
Expand Up @@ -333,7 +333,7 @@
<footer>
<hr/>
<h4>Legend</h4>
<p><span class="success"><strong>Executed</strong></span><span class="danger"><strong>Not Executed</strong></span><span class="warning"><strong>Dead Code</strong></span></p>
<p><span class="legend covered-by-small-tests">Covered by small (and larger) tests</span><span class="legend covered-by-medium-tests">Covered by medium (and large) tests</span><span class="legend covered-by-large-tests">Covered by large tests (and tests of unknown size)</span><span class="legend not-covered">Not covered</span><span class="legend not-coverable">Not coverable</span></p>
<p>
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage %s</a> using <a href="%s" target="_top">%s</a> at %s.</small>
</p>
Expand Down
Expand Up @@ -173,7 +173,7 @@
<footer>
<hr/>
<h4>Legend</h4>
<p><span class="success"><strong>Executed</strong></span><span class="danger"><strong>Not Executed</strong></span><span class="warning"><strong>Dead Code</strong></span></p>
<p><span class="legend covered-by-small-tests">Covered by small (and larger) tests</span><span class="legend covered-by-medium-tests">Covered by medium (and large) tests</span><span class="legend covered-by-large-tests">Covered by large tests (and tests of unknown size)</span><span class="legend not-covered">Not covered</span><span class="legend not-coverable">Not coverable</span></p>
<p>
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage %s</a> using <a href="%s" target="_top">%s</a> at %s.</small>
</p>
Expand Down

0 comments on commit d0ddca0

Please sign in to comment.