diff --git a/src/PHPCensor/Plugin/Pdepend.php b/src/PHPCensor/Plugin/Pdepend.php index b8fe1bcd..dc02df9d 100644 --- a/src/PHPCensor/Plugin/Pdepend.php +++ b/src/PHPCensor/Plugin/Pdepend.php @@ -79,7 +79,7 @@ class Pdepend extends Plugin public function execute() { if (!file_exists($this->location)) { - mkdir($this->location, 0777, true); + mkdir($this->location, (0777 & ~umask()), true); } if (!is_writable($this->location)) { throw new \Exception(sprintf('The location %s is not writable or does not exist.', $this->location)); diff --git a/src/PHPCensor/Plugin/PhpUnit.php b/src/PHPCensor/Plugin/PhpUnit.php index 77e3c8f2..3d813c36 100644 --- a/src/PHPCensor/Plugin/PhpUnit.php +++ b/src/PHPCensor/Plugin/PhpUnit.php @@ -148,7 +148,7 @@ class PhpUnit extends Plugin implements ZeroConfigPluginInterface } if (!file_exists($this->location) && $options->getOption('coverage')) { - mkdir($this->location, 0777, true); + mkdir($this->location, (0777 & ~umask()), true); } $arguments = $this->builder->interpolate($options->buildArgumentString());