private function PHP_CodeCoverage_Report_XML::initTargetDirectory in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php \PHP_CodeCoverage_Report_XML::initTargetDirectory()
2 calls to PHP_CodeCoverage_Report_XML::initTargetDirectory()
- PHP_CodeCoverage_Report_XML::process in vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage/ Report/ XML.php - PHP_CodeCoverage_Report_XML::processFile in vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage/ Report/ XML.php
File
- vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage/ Report/ XML.php, line 50
Class
- PHP_CodeCoverage_Report_XML
- @since Class available since Release 2.0.0
Code
private function initTargetDirectory($dir) {
if (file_exists($dir)) {
if (!is_dir($dir)) {
throw new PHP_CodeCoverage_Exception("'{$dir}' exists but is not a directory.");
}
if (!is_writable($dir)) {
throw new PHP_CodeCoverage_Exception("'{$dir}' exists but is not writable.");
}
}
elseif (!@mkdir($dir, 0777, true)) {
throw new PHP_CodeCoverage_Exception("'{$dir}' could not be created.");
}
}