php-code-coverage icon indicating copy to clipboard operation
php-code-coverage copied to clipboard

All ternary branches must be measured

Open mvorisek opened this issue 1 year ago • 0 comments

Q A
php-code-coverage version 10.1.11
PHP version 8.3.0
Driver Xdebug
PCOV version (if used) n/a
Xdebug version (if used) 3.3.1
Installation Method Composer
Usage Method PHPUnit
PHPUnit version (if used) 10.5.9

repro code: https://github.com/atk4/data/blob/9e46bc827f/src/Reference/ContainsOne.php#L20

https://app.codecov.io/gh/atk4/data/pull/1158/blob/src/Reference/ContainsOne.php#L20

image

Expected behaviour:

Both false/true ternary (and also null coalescing branch of null coalescing operator) must be measured.

In the screenshot above, the l20 must be either green or red.

mvorisek avatar Feb 02 '24 22:02 mvorisek