Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All ternary branches must be measured #1029

Open
mvorisek opened this issue Feb 2, 2024 · 0 comments
Open

All ternary branches must be measured #1029

mvorisek opened this issue Feb 2, 2024 · 0 comments

Comments

@mvorisek
Copy link
Contributor

mvorisek commented Feb 2, 2024

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 mvorisek changed the title Ternary branch can be unmeasured All ternary branches must be measured Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant