private function PHP_CodeCoverage_Report_Crap4j::getCrapLoad in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php \PHP_CodeCoverage_Report_Crap4j::getCrapLoad()
Parameters
float $crapValue:
int $cyclomaticComplexity:
float $coveragePercent:
Return value
float
1 call to PHP_CodeCoverage_Report_Crap4j::getCrapLoad()
- PHP_CodeCoverage_Report_Crap4j::process in vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage/ Report/ Crap4j.php
File
- vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage/ Report/ Crap4j.php, line 144
Class
- PHP_CodeCoverage_Report_Crap4j
- @since Class available since Release 2.0.0
Code
private function getCrapLoad($crapValue, $cyclomaticComplexity, $coveragePercent) {
$crapLoad = 0;
if ($crapValue >= $this->threshold) {
$crapLoad += $cyclomaticComplexity * (1.0 - $coveragePercent / 100);
$crapLoad += $cyclomaticComplexity / $this->threshold;
}
return $crapLoad;
}