function Renderer::pathToRoot
1 call to Renderer::pathToRoot()
- Renderer::setCommonTemplateVariables in vendor/
phpunit/ php-code-coverage/ src/ Report/ Html/ Renderer.php
File
-
vendor/
phpunit/ php-code-coverage/ src/ Report/ Html/ Renderer.php, line 232
Class
- Renderer
- @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage
Namespace
SebastianBergmann\CodeCoverage\Report\HtmlCode
protected function pathToRoot(AbstractNode $node) : string {
$id = $node->id();
$depth = substr_count($id, '/');
if ($id !== 'index' && $node instanceof DirectoryNode) {
$depth++;
}
return str_repeat('../', $depth);
}