-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
feature/code-coverageIssues related to code coverage (but not php-code-coverage)Issues related to code coverage (but not php-code-coverage)feature/metadata/attributestype/enhancementA new idea that should be implementedA new idea that should be implemented
Description
This could be as simple as
diff --git a/src/Util/Test.php b/src/Util/Test.php
index 5586c3fd4..605dbebc8 100644
--- a/src/Util/Test.php
+++ b/src/Util/Test.php
@@ -889,8 +889,15 @@ private static function getLinesToBeCoveredOrUsed(string $className, string $met
}
$codeList = [];
+ $files = [];
foreach (\array_unique($list) as $element) {
+ if (\file_exists($element)) {
+ $files[] = $element;
+
+ continue;
+ }
+
if ($classShortcut && \strncmp($element, '::', 2) === 0) {
$element = $classShortcut . $element;
}
@@ -914,7 +921,13 @@ private static function getLinesToBeCoveredOrUsed(string $className, string $met
);
}
- return self::resolveReflectionObjectsToLines($codeList);
+ $lines = self::resolveReflectionObjectsToLines($codeList);
+
+ foreach ($files as $file) {
+ $lines[$file] = \range(1, \count(\file($file)));
+ }
+
+ return $lines;
}
/**
SamMousa, graste, bancer, Asenar, ravage84 and 2 more
Metadata
Metadata
Assignees
Labels
feature/code-coverageIssues related to code coverage (but not php-code-coverage)Issues related to code coverage (but not php-code-coverage)feature/metadata/attributestype/enhancementA new idea that should be implementedA new idea that should be implemented