-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
Single line method is ignored #1020
Comments
CC @Slamdunk |
Looking at here: It seems to me that the CC is correctly reported both times:
The I see no bug here 🤷 |
@Slamdunk Thank you! |
No, this is not what the issue is about. see https://app.codecov.io/gh/atk4/core/blob/develop/tests%2FInitializerTraitTest.php#L50 and https://app.codecov.io/gh/atk4/core/blob/develop/tests%2FInitializerTraitTest.php#L72 when the method is defined as:
there is simply no red/green coverage at all, ie. coverage is not measured when the method is reformatted to:
the coverage is then measured as expected, but the first format should be used per https://www.php-fig.org/per/coding-style/#4-classes-properties-and-methods |
repro code:
(full source code: https://github.com/atk4/core/blob/5.0.0/tests/InitializerTraitTest.php#L72)
when the code above is modified like:
+ #[\Override] public function init(): void {}
then the coverage is collected. It seems this lib does not account for single line methods (methods starting and ending at the same line, even a method attribute on another line is enough to enable coverage).
The text was updated successfully, but these errors were encountered: