You are here

private function PHP_CodeCoverage_Report_XML::processDirectory in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php \PHP_CodeCoverage_Report_XML::processDirectory()
1 call to PHP_CodeCoverage_Report_XML::processDirectory()
PHP_CodeCoverage_Report_XML::process in vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php

File

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

Class

PHP_CodeCoverage_Report_XML
@since Class available since Release 2.0.0

Code

private function processDirectory(PHP_CodeCoverage_Report_Node_Directory $directory, PHP_CodeCoverage_Report_XML_Node $context) {
  $dirObject = $context
    ->addDirectory($directory
    ->getName());
  $this
    ->setTotals($directory, $dirObject
    ->getTotals());
  foreach ($directory as $node) {
    if ($node instanceof PHP_CodeCoverage_Report_Node_Directory) {
      $this
        ->processDirectory($node, $dirObject);
      continue;
    }
    if ($node instanceof PHP_CodeCoverage_Report_Node_File) {
      $this
        ->processFile($node, $dirObject);
      continue;
    }
    throw new PHP_CodeCoverage_Exception('Unknown node type for XML report');
  }
}