/** * @param PHP_CodeCoverage_Report_Node_Directory $root * @param array $items * @param array $tests * @param boolean $cacheTokens */ private function addItems(Directory $root, array $items) { foreach ($items as $key => $value) { if (substr($key, -2) == '/f') { $key = substr($key, 0, -2); if (file_exists($root->getPath() . DIRECTORY_SEPARATOR . $key)) { $root->addFile($key, $value); } } else { $child = $root->addDirectory($key); $this->addItems($child, $value); } } }