File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -228,13 +228,11 @@ public function process(PHP_CodeCoverage $coverage, $showColors = false)
228228 }
229229
230230 protected function getCoverageColor ($ numberOfCoveredElements , $ totalNumberOfElements ) {
231- if ($ totalNumberOfElements > 0 ) {
232- $ coverage = $ numberOfCoveredElements / $ totalNumberOfElements * 100 ;
233- if ($ coverage > $ this ->highLowerBound ) {
234- return $ this ->colors ['green ' ];
235- } else if ($ coverage > $ this ->lowUpperBound ) {
236- return $ this ->colors ['yellow ' ];
237- }
231+ $ coverage = PHP_CodeCoverage_Util::percent ($ numberOfCoveredElements , $ totalNumberOfElements );
232+ if ($ coverage > $ this ->highLowerBound ) {
233+ return $ this ->colors ['green ' ];
234+ } else if ($ coverage > $ this ->lowUpperBound ) {
235+ return $ this ->colors ['yellow ' ];
238236 }
239237 return $ this ->colors ['red ' ];
240238 }
You can’t perform that action at this time.
0 commit comments