View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000969 | Xdebug | Uncategorized | public | 2013-08-12 10:46 | 2013-10-09 18:38 |
| Reporter | Assigned To | derick | |||
| Priority | high | Severity | major | Reproducibility | always |
| Status | resolved | Resolution | no change required | ||
| Platform | Unix | OS | OS X | OS Version | 10.8.4 |
| Product Version | 2.2.3 | ||||
| Summary | 0000969: XDebug (when used with PHPUnit) marks closing curly braces after a switch or if as not covered | ||||
| Description | I use XDebug 2.2.3 together with PHP_CodeCoverage 1.2.12 and PHPUnit 3.7.24 to generate code coverage reports for my code tested by PHPUnit. My code includes some switch case statements right at the end of methods, so I process a value and depending on it different values get returned right in the switch case: <code>public function someMethod() {
As you can see, there is no case where the switch would be left and PHP would proceed executing the code of the method - instead, in every case the switch is left with a return statement or throwing an Exception. This is not really a bug in XDebug as the last line (marked in the code) with only the closing curly brace is actually never run - but the question is if this should be like that: My request: Ignore lines with only a brace from code coverage analysis. | ||||
| Steps To Reproduce | Use the code I mentioned in the description. This might also just be a function, but I only tested with a instance method. | ||||
| Additional Information | My PHP version is actually 5.5.1 and not 5.5-dev - but I can't select it. You should probably fix that. :D | ||||
| Tags | No tags attached. | ||||
| Operating System | OS X 10.8.4 | ||||
| PHP Version | 5.5-dev | ||||
|
|
This is not a bug. In theory "$value" could be something else than 1, 2 |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2013-08-12 10:46 |
|
New Issue | |
| 2013-10-09 18:38 | derick | Note Added: 0002575 | |
| 2013-10-09 18:38 | derick | Status | new => resolved |
| 2013-10-09 18:38 | derick | Resolution | open => no change required |
| 2013-10-09 18:38 | derick | Assigned To | => derick |
| 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 |