Skip to content

Commit

Permalink
Handle slashes on windows
Browse files Browse the repository at this point in the history
Handle slashes on windows, otherwise one may receive duplicated entries in result page: `D:\app/controllers/BaseController.php`, `D:\app\controllers\BaseController.php` and so on, particularly with PHPUnit coverage report.
  • Loading branch information
piotr-cz committed Aug 5, 2014
1 parent d8373ab commit 21d960e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/PHPCodeBrowser/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ class File
*/
public function __construct($name, array $issues = array())
{
if (DIRECTORY_SEPARATOR !== '/')
{
$name = str_replace('/', DIRECTORY_SEPARATOR, $name);
}

$this->name = $name;
$this->issues = $issues;
}
Expand Down

0 comments on commit 21d960e

Please sign in to comment.