satooshi/php-coveralls — pull request #49 by jubianchi (2013-06-14 09:00:24+00:00)
Title: Better strategy to find source file's path

In ```CloverXmlCoverageCollector``` the file path is taken from the ```name``` attribute of each ```file``` element in the clover report but the clover spec (which I got from Atlassian clover-ant) states that:
* the ```name``` attribute only contains the filename
* the ```path``` attribute contains the full absolute path to the file

Here is an excerpt from the clover's XSD:

```xsd

File metrics.
@name - the file name e.g. Foo.java or Bar.groovy
@path - the filesystem-specific original path to the file e.g. c:\path\to\Bar.groovy

```

So I think it would be better to use this attribute when trying to find the full path but this would probably introduce a BC break in some cases.
With this PR, I tried to add an alternative : if the ```path``` attribute is provided, then we use it, otherwise, we fallback on the ```name``` attribute as it is the actual behavior and we should keep it.