In my NetBeans I have set up a project (ZF2 app) with PHPUnit. Everything is fine except when I try to collect the code coverage, it fails to cover certain lines, which I do not understand nor can explain.
The code is like this:
    switch($type) {
        case 'date':
            return date('Y-m-d', strtotime($value));
        case 'numeric':
        default:
            return $value;
    }
Here after the UnitTest tests both cases, the closing bracket of the switch statement is not covered.
Other example:
    foreach ($this->userRoleNames as $role) {
        if (self::$acl->hasResource($moduleName)) {
            if (self::$acl->isAllowed($role, $moduleName)) {
                return true;
            }
/* > */ }
        if (self::$acl->hasResource($privilageName)) {
            if (self::$acl->isAllowed($role, $privilageName)) {
                return true;
            }
/* > */ }
        if (self::$acl->hasResource($privilageNameFull)) {
            if (self::$acl->isAllowed($role, $privilageNameFull)) {
                return true;
            }
/* > */ }
    }
Here all the lines containing /* > */ are also not covered, even the Unit Tests are testing for any possible combinations of conditions.
Just because of these uncovered lines I am not able to reach 100% code coverage.
I am using
PHPUnit 3.7.22PHP 5.3.10-1ubuntu3.8 with Suhosin-Patch- Netbeans 7.4 (b. 201310111528)
 
Notice: strange thing is, that in other if, foreach or switch statements, that do not return any value, their closing bracket } is not matched as covered nor as uncovered (covered lines are highlighted green, uncovered red - these are simply white - see attached img) thus have no influence on Code coverage percentage...
Is there any way how can I make the PHPUnit (Code coverage module in NB) or by adjusting the PHPUnit test cover such lines?
