diff --git a/src/Report/Text.php b/src/Report/Text.php index fc6913aeb..1a35cbe0b 100644 --- a/src/Report/Text.php +++ b/src/Report/Text.php @@ -73,15 +73,14 @@ final class Text /** * @var bool */ - private $determineBranchCoverage; + private $determineBranchCoverage = false; - public function __construct(int $lowUpperBound = 50, int $highLowerBound = 90, bool $showUncoveredFiles = false, bool $showOnlySummary = false, bool $determineBranchCoverage = false) + public function __construct(int $lowUpperBound = 50, int $highLowerBound = 90, bool $showUncoveredFiles = false, bool $showOnlySummary = false) { - $this->lowUpperBound = $lowUpperBound; - $this->highLowerBound = $highLowerBound; - $this->showUncoveredFiles = $showUncoveredFiles; - $this->showOnlySummary = $showOnlySummary; - $this->determineBranchCoverage = $determineBranchCoverage; + $this->lowUpperBound = $lowUpperBound; + $this->highLowerBound = $highLowerBound; + $this->showUncoveredFiles = $showUncoveredFiles; + $this->showOnlySummary = $showOnlySummary; } public function process(CodeCoverage $coverage, bool $showColors = false): string @@ -351,6 +350,11 @@ public function process(CodeCoverage $coverage, bool $showColors = false): strin return $output . \PHP_EOL; } + public function setDetermineBranchCoverage(bool $determineBranchCoverage): void + { + $this->determineBranchCoverage = $determineBranchCoverage; + } + private function getCoverageColor(int $numberOfCoveredElements, int $totalNumberOfElements): string { $coverage = Util::percent(