Skip to content

Coverage information say's that an ending curly is dead not covered #414

@cmodijk

Description

@cmodijk

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';
        }
    }
}

schermafbeelding 2015-12-28 om 23 06 37

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions