/** * Constructor. * * @param string $name * @param PHP_CodeCoverage_Report_HTML_Node $parent * @param array $executedLines * @param boolean $yui * @param boolean $highlight * @throws RuntimeException */ public function __construct($name, PHP_CodeCoverage_Report_HTML_Node $parent, array $executedLines, $yui = TRUE, $highlight = FALSE) { parent::__construct($name, $parent); $path = $this->getPath(); if (!file_exists($path)) { throw new RuntimeException(sprintf('Path "%s" does not exist.', $path)); } $this->executedLines = $executedLines; $this->highlight = $highlight; $this->yui = $yui; $this->codeLines = $this->loadFile($path); $this->ignoredLines = PHP_CodeCoverage_Util::getLinesToBeIgnored($path); $this->calculateStatistics(); }
/** * Constructor. * * @param string $name * @param PHP_CodeCoverage_Report_HTML_Node $parent * @param array $coverageData * @param array $testData * @param boolean $cacheTokens * @param boolean $yui * @param boolean $highlight * @throws PHP_CodeCoverage_Exception */ public function __construct($name, PHP_CodeCoverage_Report_HTML_Node $parent, array $coverageData, array $testData, $cacheTokens, $yui, $highlight) { parent::__construct($name, $parent); $path = $this->getPath(); if (!file_exists($path)) { throw new PHP_CodeCoverage_Exception(sprintf('Path "%s" does not exist.', $path)); } $this->coverageData = $coverageData; $this->testData = $testData; $this->cacheTokens = $cacheTokens; $this->highlight = $highlight; $this->yui = $yui; $this->codeLines = $this->loadFile($path); $this->ignoredLines = PHP_CodeCoverage_Util::getLinesToBeIgnored($path, $cacheTokens); $this->calculateStatistics(); }