Phpunit: Coverage does not include closing curly brackets

Created on 19 Dec 2014  路  5Comments  路  Source: sebastianbergmann/phpunit

unbenannt

This closing bracket should count, though, as soon as it runs into the switch statement.
Or rather be excluded (gray), similar to the opening one.

Most helpful comment

@dereuromark it has been a while, but I'm also seeing that in our coverage, I was wondering if this ever got addressed or resolved somehow? Thx

All 5 comments

This is not an issue with PHPUnit. Nor is it an issue with PHP_CodeCoverage or Xdebug. It's a quirk in PHP's executor we can do nothing about.

So we cannot shim it or overwrite the faulty core behavior? Can we open a ticket at PHP? Or maybe someone already did?

There is nothing faulty here. The line with the } is never executed. Maybe @derickr could mark it as dead code in Xdebug but that would be the end of it.

No clue, though, why switch($length) { is gray. Maybe @derickr can elaborate on that.

@dereuromark it has been a while, but I'm also seeing that in our coverage, I was wondering if this ever got addressed or resolved somehow? Thx

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ezzatron picture ezzatron  路  3Comments

rentalhost picture rentalhost  路  4Comments

edyan picture edyan  路  4Comments

keradus picture keradus  路  3Comments

sebastianbergmann picture sebastianbergmann  路  4Comments