/** * @param PHP_CodeCoverage_Report_HTML_Node_Directory $root * @param array $items * @param array $files */ protected function addItems(PHP_CodeCoverage_Report_HTML_Node_Directory $root, array $items, array $files) { foreach ($items as $key => $value) { if (substr($key, -2) == '/f') { try { $root->addFile(substr($key, 0, -2), $value, $this->options['yui'], $this->options['highlight']); } catch (RuntimeException $e) { continue; } } else { $child = $root->addDirectory($key); $this->addItems($child, $value, $files); } } }
/** * Constructor. * * @param PHP_CodeCoverage_Report_HTML_Node_Directory $node */ public function __construct(PHP_CodeCoverage_Report_HTML_Node_Directory $node) { $this->nodes = $node->getChildNodes(); }