View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001032 | Xdebug | Uncategorized | public | 2014-02-22 18:26 | 2014-03-05 09:42 |
Reporter | aik099 | Assigned To | derick | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
OS | Slackware | OS Version | 13 | ||
Product Version | 2.2.3 | ||||
Summary | 0001032: Incorrect coverage reporting for multi-line class creation | ||||
Description | I've found out, that in following cases (see image) coverage information being incorrectly collected by xdebug or displayed in report:
| ||||
Additional Information | Related issue: https://github.com/sebastianbergmann/php-code-coverage/issues/220 | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Operating System | Linux | ||||
PHP Version | 5.4.15-5.4.20 | ||||
|
Relevant "clover.xml" part: <package name="aik099\QATools\BEM\PropertyDecorator"> Actually line 164 is empty line at the end of a file. And I'm using TABs for indentation if that helps. |
|
I can not do anything about point 1, as PHP doesn't always correctly identify which lines code belongs too. This should be addressed in the PHP parser itself. As for issue 2, can you perhaps provide me with a short example that reproduces this? It is possible that you really don't reach the end of the function — there is an implicit "return NULL" there which you technically could hit if $annotations is set, but doesn't match any of your three if/elseif clauses. |
|
1 - got it. 2 - I see, maybe in my tests I always hit all these IF/ELSE and never actually getting to the end of the method. Never thought of that. Actually you might be right, since after I've improved my coverage (method code wasn't changed) the line with a brace became covered too. Now I surely will consider closing brace of a method as "return null;" to make it clear what really happens. Thanks for detailed explanation. No bug then. You can safely close it. |
|
All right. Thanks for listening :-) |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-02-22 18:26 | aik099 | New Issue | |
2014-02-22 18:26 | aik099 | File Added: IncorrectCoverage.png | |
2014-02-22 18:41 | aik099 | Note Added: 0002674 | |
2014-02-22 18:48 | aik099 | Note Edited: 0002674 | |
2014-03-05 09:25 | derick | Note Added: 0002748 | |
2014-03-05 09:25 | derick | Assigned To | => derick |
2014-03-05 09:25 | derick | Status | new => feedback |
2014-03-05 09:33 | aik099 | Note Added: 0002753 | |
2014-03-05 09:33 | aik099 | Status | feedback => assigned |
2014-03-05 09:42 | derick | Note Added: 0002758 | |
2014-03-05 09:42 | derick | Status | assigned => resolved |
2014-03-05 09:42 | derick | Resolution | open => no change required |
2016-07-31 12:36 | derick | Category | Usage problems => Usage problems (Crashes) |
2016-07-31 12:38 | derick | Category | Usage problems (Crashes) => Usage problems (Wrong Results) |
2020-03-12 16:35 | derick | Category | Usage problems (Wrong Results) => Variable Display |
2020-03-12 16:38 | derick | Category | Variable Display => Uncategorized |