Esempio n. 1
0
 /**
  * @param Node $node
  * @param bool $total
  *
  * @return string
  */
 protected function renderItem(Node $node, $total = false)
 {
     $data = ['numClasses' => $node->getNumClassesAndTraits(), 'numTestedClasses' => $node->getNumTestedClassesAndTraits(), 'numMethods' => $node->getNumMethods(), 'numTestedMethods' => $node->getNumTestedMethods(), 'linesExecutedPercent' => $node->getLineExecutedPercent(false), 'linesExecutedPercentAsString' => $node->getLineExecutedPercent(), 'numExecutedLines' => $node->getNumExecutedLines(), 'numExecutableLines' => $node->getNumExecutableLines(), 'testedMethodsPercent' => $node->getTestedMethodsPercent(false), 'testedMethodsPercentAsString' => $node->getTestedMethodsPercent(), 'testedClassesPercent' => $node->getTestedClassesAndTraitsPercent(false), 'testedClassesPercentAsString' => $node->getTestedClassesAndTraitsPercent()];
     if ($total) {
         $data['name'] = 'Total';
     } else {
         if ($node instanceof DirectoryNode) {
             $data['name'] = sprintf('<a href="%s/index.html">%s</a>', $node->getName(), $node->getName());
             $data['icon'] = '<span class="glyphicon glyphicon-folder-open"></span> ';
         } else {
             $data['name'] = sprintf('<a href="%s.html">%s</a>', $node->getName(), $node->getName());
             $data['icon'] = '<span class="glyphicon glyphicon-file"></span> ';
         }
     }
     return $this->renderItemTemplate(new \Text_Template($this->templatePath . 'directory_item.html', '{{', '}}'), $data);
 }
Esempio n. 2
0
 protected function getInactiveBreadcrumb(AbstractNode $node, $pathToRoot)
 {
     return sprintf('        <li><a href="%sindex.html">%s</a></li>' . "\n", $pathToRoot, $node->getName());
 }
Esempio n. 3
0
 protected function getActiveBreadcrumb(AbstractNode $node)
 {
     return sprintf('        <li><a href="index.html">%s</a></li>' . "\n" . '        <li class="active">(Dashboard)</li>' . "\n", $node->getName());
 }