當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PHP_CodeCoverage_Report_Node::getNumMethods方法代碼示例

本文整理匯總了PHP中PHP_CodeCoverage_Report_Node::getNumMethods方法的典型用法代碼示例。如果您正苦於以下問題:PHP PHP_CodeCoverage_Report_Node::getNumMethods方法的具體用法?PHP PHP_CodeCoverage_Report_Node::getNumMethods怎麽用?PHP PHP_CodeCoverage_Report_Node::getNumMethods使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PHP_CodeCoverage_Report_Node的用法示例。


在下文中一共展示了PHP_CodeCoverage_Report_Node::getNumMethods方法的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());
 }
開發者ID:mrbadao,項目名稱:api-official,代碼行數:9,代碼來源:XML.php

示例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);
 }
開發者ID:altesien,項目名稱:FinalProject,代碼行數:20,代碼來源:Directory.php


注:本文中的PHP_CodeCoverage_Report_Node::getNumMethods方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。