Closed
Description
Q | A |
---|---|
php-code-coverage version | 9.2.18, 9.2.19 / latest |
PHP version | 8.0.24 |
Driver | Xdebug |
Xdebug version | 3.2.0RC1 |
Installation Method | Composer |
Usage Method | PHPUnit |
PHPUnit version | 9.5.25 |
<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1668794616">
<project timestamp="1668794616">
...
<file name="/__w/data/data/bootstrap-types.php">
<class name="Atk4\Data\Types\Types" namespace="global">
<metrics complexity="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="0" coveredstatements="0" elements="0" coveredelements="0"/>
</class>
<class name="Atk4\Data\Types\MoneyType" namespace="global">
<metrics complexity="8" methods="5" coveredmethods="5" conditionals="0" coveredconditionals="0" statements="8" coveredstatements="8" elements="13" coveredelements="13"/>
</class>
<line num="17" type="method" name="getName" visibility="public" complexity="1" crap="1" count="12"/>
<line num="19" type="stmt" count="12"/>
...
<line num="43" type="method" name="requiresSQLCommentHint" visibility="public" complexity="1" crap="1" count="12"/>
<line num="45" type="stmt" count="12"/>
<metrics loc="50" ncloc="50" classes="1" methods="5" coveredmethods="5" conditionals="0" coveredconditionals="0" statements="8" coveredstatements="8" elements="13" coveredelements="13"/>
</file>
...
simple repro code:
<?php
class Foo
{
public function x(): void
{
phpversion(); // must be covered (currently covered)
}
}
phpversion(); // must be covered too (currently NOT covered)
does not generate any coverage line (in clover output)
when the statement is added into method body, the coverage is generated, but for some reasons, coverage for statement outside/below method does not - maybe related to clover only, not sure
Metadata
Metadata
Assignees
Labels
No labels