本文整理汇总了PHP中PHP_CodeCoverage_Report_Node::getNumExecutableLines方法的典型用法代码示例。如果您正苦于以下问题:PHP PHP_CodeCoverage_Report_Node::getNumExecutableLines方法的具体用法?PHP PHP_CodeCoverage_Report_Node::getNumExecutableLines怎么用?PHP PHP_CodeCoverage_Report_Node::getNumExecutableLines使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHP_CodeCoverage_Report_Node
的用法示例。
在下文中一共展示了PHP_CodeCoverage_Report_Node::getNumExecutableLines方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setTotals
private function setTotals(PHP_CodeCoverage_Report_Node $node, PHP_CodeCoverage_Report_XML_Totals $totals)
{
$loc = $node->getLinesOfCode();
$totals->setNumLines($loc['loc'], $loc['cloc'], $loc['ncloc'], $node->getNumExecutableLines(), $node->getNumExecutedLines());
$totals->setNumClasses($node->getNumClasses(), $node->getNumTestedClasses());
$totals->setNumTraits($node->getNumTraits(), $node->getNumTestedTraits());
$totals->setNumMethods($node->getNumMethods(), $node->getNumTestedMethods());
$totals->setNumFunctions($node->getNumFunctions(), $node->getNumTestedFunctions());
}
示例2: renderItem
/**
* @param PHP_CodeCoverage_Report_Node $item
* @param boolean $total
* @return string
*/
protected function renderItem(PHP_CodeCoverage_Report_Node $item, $total = FALSE)
{
$data = array('numClasses' => $item->getNumClassesAndTraits(), 'numTestedClasses' => $item->getNumTestedClassesAndTraits(), 'numMethods' => $item->getNumMethods(), 'numTestedMethods' => $item->getNumTestedMethods(), 'linesExecutedPercent' => $item->getLineExecutedPercent(FALSE), 'linesExecutedPercentAsString' => $item->getLineExecutedPercent(), 'numExecutedLines' => $item->getNumExecutedLines(), 'numExecutableLines' => $item->getNumExecutableLines(), 'testedMethodsPercent' => $item->getTestedMethodsPercent(FALSE), 'testedMethodsPercentAsString' => $item->getTestedMethodsPercent(), 'testedClassesPercent' => $item->getTestedClassesAndTraitsPercent(FALSE), 'testedClassesPercentAsString' => $item->getTestedClassesAndTraitsPercent());
if ($total) {
$data['name'] = 'Total';
} else {
$data['name'] = sprintf('<a href="%s.html">%s</a>', $item->getId(), $item->getName());
if ($item instanceof PHP_CodeCoverage_Report_Node_Directory) {
$data['icon'] = '<i class="icon-folder-open"></i> ';
} else {
$data['icon'] = '<i class="icon-file"></i> ';
}
}
return $this->renderItemTemplate(new Text_Template($this->templatePath . 'directory_item.html'), $data);
}