diff --git a/src/Rule/Rules/File/PhpFileFinder.php b/src/Rule/Rules/File/PhpFileFinder.php index ee271900..ac31dd12 100644 --- a/src/Rule/Rules/File/PhpFileFinder.php +++ b/src/Rule/Rules/File/PhpFileFinder.php @@ -105,6 +105,10 @@ public function filesFromScope( /** @return list */ private function sourcePaths(string $basePath): array { - return array_values(array_unique($this->sourcePaths ?? $this->psr4PathResolver->paths($basePath))); + if ($this->sourcePaths === null) { + return $this->psr4PathResolver->paths($basePath); + } + + return array_values(array_unique($this->sourcePaths)); } }