<?php
namespace Bar;

class Foo
{
    public function fooBad($arg = true)
    {
        if ($arg) {
            if ($arg) {
                return true;
            }
        } else {
            return false;
        }
    }
    public function fooGood($arg = true)
    {
        if ($arg) {
            return true;
        } else {
            return false;
        }
    }
}

xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);
$foo = new \Bar\Foo();
$foo->fooBad(false);
var_dump(xdebug_get_code_coverage());
xdebug_stop_code_coverage();

xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);
$bar = new \Bar\Foo();
$bar->fooGood(false);
var_dump(xdebug_get_code_coverage());
xdebug_stop_code_coverage();

