sebastianbergmann/php-code-coverage — pull request #137 by alexanderilyin (2012-11-13 14:40:49+00:00)
Title: Process uncovered files from whitelist only if include of target file file will not cause fatals or execute code 

When you try to whitelist all of your legacy PHP files you face with two problems. So expected configuration in `phpunit.xml` is:

```xml

```

So if you'll have files like below in whitelist:

```php
rand = rand();
}
}
```

You face with such error which break report generation:

```
Fatal error: Class 'Unknown_Class' not found in /Users/alexanderilyin/github.com/badoo/phpunit/PHPUnit/Empty_Top_Class.php on line 10

Call Stack:
0.0002 641544 1. {main}() /Users/alexanderilyin/github.com/badoo/phpunit/phpunit.php:0
0.0038 1298416 2. PHPUnit_TextUI_Command::main() /Users/alexanderilyin/github.com/badoo/phpunit/phpunit.php:46
0.0038 1299432 3. PHPUnit_TextUI_Command->run() /Users/alexanderilyin/github.com/badoo/phpunit/PHPUnit/TextUI/Command.php:129
0.0224 4680848 4. PHPUnit_TextUI_TestRunner->doRun() /Users/alexanderilyin/github.com/badoo/phpunit/PHPUnit/TextUI/Command.php:176
0.0986 9060448 5. PHP_CodeCoverage_Report_Clover->process() /Users/alexanderilyin/github.com/badoo/phpunit/PHPUnit/TextUI/TestRunner.php:362
0.0987 9062496 6. PHP_CodeCoverage->getReport() /Users/alexanderilyin/github.com/badoo/php-code-coverage/PHP/CodeCoverage/Report/Clover.php:84
0.0990 9125464 7. PHP_CodeCoverage_Report_Factory->create() /Users/alexanderilyin/github.com/badoo/php-code-coverage/PHP/CodeCoverage.php:158
0.0990 9125464 8. PHP_CodeCoverage->getData() /Users/alexanderilyin/github.com/badoo/php-code-coverage/PHP/CodeCoverage/Report/Factory.php:64
0.0990 9125464 9. PHP_CodeCoverage->addUncoveredFilesFromWhitelist() /Users/alexanderilyin/github.com/badoo/php-code-coverage/PHP/CodeCoverage.php:190
0.1041 9895416 10. PHP_CodeCoverage->processUncoveredFileFromWhitelist() /Users/alexanderilyin/github.com/badoo/php-code-coverage/PHP/CodeCoverage.php:534
0.1043 9900832 11. include_once('/Users/alexanderilyin/github.com/badoo/phpunit/PHPUnit/Empty_Top_Class.php') /Users/alexanderilyin/github.com/badoo/php-code-coverage/PHP/CodeCoverage.php:557
```

Also you could have whitelisted some executable code which possible can cause some problems when executed during coverage report generation:

```php
rand = rand();
var_dump($this->rand);
}
}

$class = new Empty_Nested_Class();
```