For this simple function the ending curly brace is detected as dead code. I think it has something to do with the finally part but i'm not sure.
class Unzip
{
public function extractFile()
{
try {
return true;
} finally {
echo 'Do somthing';
}
}
}

The test case
class UnzipTest extends \PHPUnit_Framework_TestCase
{
public function testUnzip()
{
$unzip = new Unzip();
$this->assertTrue($unzip->extractFile());
}
}
Versions
- Xdebug: v2.3.3
- phpunit: 4.8.21
- PHP: 5.6.16