You are here

public function PHP_CodeCoverage_Report_XML_Node::getTotals in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Node.php \PHP_CodeCoverage_Report_XML_Node::getTotals()

File

vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Node.php, line 47

Class

PHP_CodeCoverage_Report_XML_Node
@since Class available since Release 2.0.0

Code

public function getTotals() {
  $totalsContainer = $this
    ->getContextNode()->firstChild;
  if (!$totalsContainer) {
    $totalsContainer = $this
      ->getContextNode()
      ->appendChild($this->dom
      ->createElementNS('http://schema.phpunit.de/coverage/1.0', 'totals'));
  }
  return new PHP_CodeCoverage_Report_XML_Totals($totalsContainer);
}