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

Breadcrumb

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

function ProcessedCodeCoverageData::priorityForLine

Determine the priority for a line.

1 = the line is not set 2 = the line has not been tested 3 = the line is dead code 4 = the line has been tested

During a merge, a higher number is better.

1 call to ProcessedCodeCoverageData::priorityForLine()
ProcessedCodeCoverageData::merge in vendor/phpunit/php-code-coverage/src/Data/ProcessedCodeCoverageData.php

File

vendor/phpunit/php-code-coverage/src/Data/ProcessedCodeCoverageData.php, line 220

Class

ProcessedCodeCoverageData
@internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage

Namespace

SebastianBergmann\CodeCoverage\Data

Code

private function priorityForLine(array $data, int $line) : int {
    if (!array_key_exists($line, $data)) {
        return 1;
    }
    if (is_array($data[$line]) && count($data[$line]) === 0) {
        return 2;
    }
    if ($data[$line] === null) {
        return 3;
    }
    return 4;
}
RSS feed
Powered by Drupal