diff --git a/composer.json b/composer.json index 2e870a0..950bd30 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ "ext-filter" : "*", "ext-mbstring" : "*", - "phpunit/phpunit" : "^9.6.29", + "phpunit/phpunit" : "^11.5.41", "ulrichsg/getopt-php" : ">=4.0.4", "jbzoo/markdown" : "^7.0.1" }, diff --git a/src/CovCatcher.php b/src/CovCatcher.php index 1afe093..6c8b453 100644 --- a/src/CovCatcher.php +++ b/src/CovCatcher.php @@ -122,7 +122,7 @@ private function start(): void { if (!$this->isStarted) { $this->isStarted = true; - $this->coverage?->start($this->hash, true); + $this->coverage?->start($this->hash, null, true); } } @@ -188,8 +188,10 @@ private static function prepareFilter(string $dirPath): Filter { $covFilter = new Filter(); - foreach ((new FileIteratorFacade())->getFilesAsArray($dirPath, '.php') as $file) { - $covFilter->includeFile($file); + if ($dirPath !== '') { + foreach ((new FileIteratorFacade())->getFilesAsArray($dirPath, '.php') as $file) { + $covFilter->includeFile($file); + } } return $covFilter;