Skip to content

Commit e6103f3

Browse files
committed
Fix build
1 parent 8a7ae4f commit e6103f3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Command/FixerApplication.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,9 @@ private function downloadPhar(
360360
$output->writeln('<fg=green>Downloading the latest PHPStan Pro...</>');
361361

362362
$pharPathResource = fopen($pharPath, 'w');
363+
if ($pharPathResource === false) {
364+
throw new \PHPStan\ShouldNotHappenException(sprintf('Could not open file %s for writing.', $pharPath));
365+
}
363366
$progressBar = new ProgressBar($output);
364367
$client->requestStreaming('GET', $latestInfo['url'])->done(static function (ResponseInterface $response) use ($loop, $pharPath, $progressBar, $pharPathResource): void {
365368
$body = $response->getBody();

0 commit comments

Comments
 (0)