-
-
Notifications
You must be signed in to change notification settings - Fork 737
Closed
rectorphp/rector-src
#7078Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | last dev-main |
| Installed as | composer dependency |
Minimal PHP Code Causing Issue
See https://getrector.com/demo/27ca355e-ce93-439a-9124-842cf791ecca
<?php
final class DemoFile
{
public function download(Upload $file, array $headers = [])
{
try {
try {
return $this->storage->download($file, $headers);
} catch (RemoteFileNotFoundException $e) {
return $this->localStorage->download($file, $headers);
}
} catch (FileNotFoundException $e) {
abort(404);
- }
+ }
+ return null;
}
}Responsible rules
ExplicitReturnNullRector
Expected Behavior
Hello!
This rule is causing PHPStan to error with Unreachable statement - code above always terminates.