Skip to content

Commit

Permalink
Closes #736
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Feb 21, 2022
1 parent fce45ec commit efac078
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt

### Fixed

* [#736](https://github.com/sebastianbergmann/php-code-coverage/issues/736): HTML report generator allows invalid values for low upper bound and high lower bound
* [#854](https://github.com/sebastianbergmann/php-code-coverage/issues/854): "Class Coverage Distribution" and "Class Complexity" graphs are not displayed at full width

## [9.2.11] - 2022-02-18
Expand Down
7 changes: 7 additions & 0 deletions src/Report/Html/Facade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use function substr;
use SebastianBergmann\CodeCoverage\CodeCoverage;
use SebastianBergmann\CodeCoverage\Directory as DirectoryUtil;
use SebastianBergmann\CodeCoverage\InvalidArgumentException;
use SebastianBergmann\CodeCoverage\Node\Directory as DirectoryNode;

final class Facade
Expand All @@ -42,6 +43,12 @@ final class Facade

public function __construct(int $lowUpperBound = 50, int $highLowerBound = 90, string $generator = '')
{
if ($lowUpperBound > $highLowerBound) {
throw new InvalidArgumentException(
'$lowUpperBound must not be larger than $highLowerBound'
);
}

$this->generator = $generator;
$this->highLowerBound = $highLowerBound;
$this->lowUpperBound = $lowUpperBound;
Expand Down

0 comments on commit efac078

Please sign in to comment.