mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-31 12:42:05 +01:00
ensure stub directory is present
This commit is contained in:
parent
5055f7db85
commit
9477ede19d
@ -34,6 +34,7 @@ final class JetbrainsStubsRenamer
|
||||
private function renameStubFileSuffixes(string $directory): void
|
||||
{
|
||||
$stubFileInfos = $this->getStubFileInfos($directory);
|
||||
|
||||
foreach ($stubFileInfos as $stubFileInfo) {
|
||||
$path = $stubFileInfo->getPathname();
|
||||
|
||||
@ -64,7 +65,10 @@ final class JetbrainsStubsRenamer
|
||||
private function getStubFileInfos(string $phpStormStubsDirectory): array
|
||||
{
|
||||
if (! is_dir($phpStormStubsDirectory)) {
|
||||
return [];
|
||||
throw new CompilerShouldNotHappenException(sprintf(
|
||||
'Directory "%s" was not found',
|
||||
$phpStormStubsDirectory
|
||||
));
|
||||
}
|
||||
|
||||
$stubFinder = Finder::create()
|
||||
|
Loading…
x
Reference in New Issue
Block a user