protected function collectFileCoverage(\SimpleXMLElement $file, $root)
    {
        $absolutePath = realpath((string) ($file['path'] ?: $file['name']));

        if (strpos($absolutePath, $root) === false) {
            return;
        }

        $filename = $absolutePath;

        if ($root !== DIRECTORY_SEPARATOR) {
            $filename = str_replace($root, '', $absolutePath);
        }

        return $this->collectCoverage($file, $absolutePath, $filename);
    }
protected function collectFileCoverage(\SimpleXMLElement $file, $root)
    {
        $absolutePath = realpath((string) ($file['path'] ?: $file['name']));

        if (strpos($absolutePath, $root) === false) {
            return;
        }

        $filename = $absolutePath;

        if ($root !== DIRECTORY_SEPARATOR) {
            $filename = str_replace($root, '', $absolutePath);
        }

        return $this->collectCoverage($file, $absolutePath, $filename);
    }
protected function collectFileCoverage ( \ SimpleXMLElement $ file , $ root ) { $ absolutePath = realpath ( ( string ) ( $ file [ 'path' ] ? : $ file [ 'name' ] ) ) ; if ( strpos ( $ absolutePath , $ root ) === false ) { return ; } $ filename = $ absolutePath ; if ( $ root !== DIRECTORY_SEPARATOR ) { $ filename = str_replace ( $ root , '' , $ absolutePath ) ; } return $ this -> collectCoverage ( $ file , $ absolutePath , $ filename ) ; }
Collect coverage data of a file.

@param \SimpleXMLElement $file clover XML object of a file
@param string            $root path to src directory

@return null|\PhpCoveralls\Bundle\CoverallsBundle\Entity\SourceFile
Collect coverage data of a file .