Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Crap4j.php

function Crap4j::crapLoad

1 call to Crap4j::crapLoad()
Crap4j::process in vendor/phpunit/php-code-coverage/src/Report/Crap4j.php

File

vendor/phpunit/php-code-coverage/src/Report/Crap4j.php, line 137

Class

Crap4j

Namespace

SebastianBergmann\CodeCoverage\Report

Code

private function crapLoad(float $crapValue, int $cyclomaticComplexity, float $coveragePercent) : float {
    $crapLoad = 0;
    if ($crapValue >= $this->threshold) {
        $crapLoad += $cyclomaticComplexity * (1.0 - $coveragePercent / 100);
        $crapLoad += $cyclomaticComplexity / $this->threshold;
    }
    return $crapLoad;
}
RSS feed
Powered by Drupal