Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Phpunit, why is this a dead code?

Tags:

phpunit

I'm using PHPUnit (4.1.3) and it calls something as dead code:

enter image description here

it really annoys me. Its OK that codes after return are dead, but calling a closing bracket as dead code is just overkill

like image 510
John Smith Avatar asked Sep 08 '14 09:09

John Smith


1 Answers

XDebug parsing issue, so the closing brace is not executed after the return statement since the code leaves that function and does not actually execute the closing brace. This is a known issue in the XDebug/PHP/PHPUnit parsing/executing space.

like image 158
Steven Scott Avatar answered Nov 17 '22 03:11

Steven Scott