diff --git a/coverage-check.php b/coverage-check.php index a4f8aae..f0dc6f9 100755 --- a/coverage-check.php +++ b/coverage-check.php @@ -11,7 +11,7 @@ } $inputFile = $argv[1]; -$percentage = min(100, max(0, (int)$argv[2])); +$percentage = min(100, max(0, (float)$argv[2])); $xml = new SimpleXMLElement(file_get_contents($inputFile)); $metrics = $xml->xpath('//metrics'); @@ -40,4 +40,4 @@ exit(1); } -echo 'Total code coverage is ' . sprintf('%0.2f', $TPC) . '% - OK!' . PHP_EOL; \ No newline at end of file +echo 'Total code coverage is ' . sprintf('%0.2f', $TPC) . '% - OK!' . PHP_EOL;