/** * Renders the report. * * @param $codeCoverageLineInformation code coverage (line) * @param $codeCoverageBranchInformation code coverage (branch) * @param $title string * @param $target string * @param $charset string * @param $yui boolean * @param $highlight boolean * @param $lowUpperBound integer * @param $highLowerBound integer */ public static function render($codeCoverageLineInformation, $codeCoverageBranchInformation = array(), $target = 'CoverageReport', $title = 'PHP Coverage Report', $charset = 'ISO-8859-1', $yui = TRUE, $highlight = FALSE, $lowUpperBound = 35, $highLowerBound = 70) { ini_set('memory_limit', '2048M'); $target = PHPCoverage_Util_Filesystem::getDirectory($target); self::$templatePath = sprintf('%s%sReport%sTemplate%s', dirname(__FILE__), DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR); $files = self::formatCoverageData($codeCoverageLineInformation); PHPCoverage_Util_CodeCoverage::setBranchInformation($codeCoverageBranchInformation); $commonPath = PHPCoverage_Util_Filesystem::reducePaths($files); $items = self::buildDirectoryStructure($files); unset($codeCoverageLineInformation); $root = new PHPCoverage_Util_Report_Node_Directory($commonPath, NULL); unset($commonPath); self::addItems($root, $items, $files, $yui, $highlight); self::copyFiles($target); PHPCoverage_Util_CodeCoverage::clearSummary(); $root->render($target, $title, $charset, $lowUpperBound, $highLowerBound); }