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

Breadcrumb

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

function CodeCoverage::processUnintentionallyCoveredUnits

Parameters

list<string> $unintentionallyCoveredUnits:

Return value

list<string>

Throws

ReflectionException

1 call to CodeCoverage::processUnintentionallyCoveredUnits()
CodeCoverage::performUnintentionallyCoveredCodeCheck in vendor/phpunit/php-code-coverage/src/CodeCoverage.php

File

vendor/phpunit/php-code-coverage/src/CodeCoverage.php, line 569

Class

CodeCoverage
Provides collection functionality for PHP code coverage information.

Namespace

SebastianBergmann\CodeCoverage

Code

private function processUnintentionallyCoveredUnits(array $unintentionallyCoveredUnits) : array {
    $unintentionallyCoveredUnits = array_unique($unintentionallyCoveredUnits);
    $processed = [];
    foreach ($unintentionallyCoveredUnits as $unintentionallyCoveredUnit) {
        $tmp = explode('::', $unintentionallyCoveredUnit);
        if (count($tmp) !== 2) {
            $processed[] = $unintentionallyCoveredUnit;
            continue;
        }
        try {
            $class = new ReflectionClass($tmp[0]);
            foreach ($this->parentClassesExcludedFromUnintentionallyCoveredCodeCheck as $parentClass) {
                if ($class->isSubclassOf($parentClass)) {
                    continue 2;
                }
            }
        } catch (\ReflectionException $e) {
            throw new ReflectionException($e->getMessage(), $e->getCode(), $e);
        }
        $processed[] = $tmp[0];
    }
    $processed = array_unique($processed);
    sort($processed);
    return $processed;
}
RSS feed
Powered by Drupal