You are here

private static function PHPUnit_Util_Test::resolveReflectionObjectsToLines in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/src/Util/Test.php \PHPUnit_Util_Test::resolveReflectionObjectsToLines()

Parameters

array $reflectors:

Return value

array

1 call to PHPUnit_Util_Test::resolveReflectionObjectsToLines()
PHPUnit_Util_Test::getLinesToBeCoveredOrUsed in vendor/phpunit/phpunit/src/Util/Test.php
@since Method available since Release 4.2.0

File

vendor/phpunit/phpunit/src/Util/Test.php, line 962

Class

PHPUnit_Util_Test
Test helpers.

Code

private static function resolveReflectionObjectsToLines(array $reflectors) {
  $result = array();
  foreach ($reflectors as $reflector) {
    $filename = $reflector
      ->getFileName();
    if (!isset($result[$filename])) {
      $result[$filename] = array();
    }
    $result[$filename] = array_unique(array_merge($result[$filename], range($reflector
      ->getStartLine(), $reflector
      ->getEndLine())));
  }
  return $result;
}