sebastianbergmann/php-code-coverage — Issue #94: runkit created functions cause Code Coverage to throw warnings
Author: mattzuba
Created: 2012-03-02 22:05:34+00:00
State: open

As the title says, when using runkit to create a function CodeCoverage throws warnings from file_get_contents because the file can't be found.

I added a line in isFile() to correct this which seemed to work for me...

```php

/**
* Checks whether a filename is a real filename.
*
* @param string $filename
*/
public function isFile($filename)
{
if ($filename == '-' ||
strpos($filename, 'eval()\'d code') !== FALSE ||
strpos($filename, 'runtime-created function') !== FALSE ||
strpos($filename, 'runkit created function') !== FALSE ||
strpos($filename, 'assert code') !== FALSE ||
strpos($filename, 'regexp code') !== FALSE) {
return FALSE;
}

return TRUE;
}
```