/** * Constructor. * * @param $name string * @param $parent PHPCoverage_Util_Report_Node * @param $executedLines array * @param $yui boolean * @param $highlight boolean * @throws RuntimeException */ public function __construct($name, PHPCoverage_Util_Report_Node $parent = NULL, array $executedLines, $yui = TRUE, $highlight = FALSE) { parent::__construct($name, $parent); $path = $this->getPath(); if (!file_exists($path)) { throw new Exception(sprintf('Path "%s" does not exist.', $path)); } $this->executedLines = $executedLines; $this->highlight = $highlight; $this->yui = $yui; $this->codeLines = $this->loadFile($path); $this->branchInformation = PHPCoverage_Util_CodeCoverage::getBranchInformation($path); $this->calculateStatistics(); }