-
-
Notifications
You must be signed in to change notification settings - Fork 737
Closed
rectorphp/rector-src
#3552Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version: 0f0b93 - released at 2023-03-27 15:06 |
Minimal PHP Code Causing Issue
https://getrector.com/demo/03e903e4-92b0-445a-9066-ff52a95ae876
final class DemoFile
{
private string|null $foo;
public function _construct(string $string)
{
$this->foo = $string;
}
public function do(): void
{
$bar = '';
if ($this->foo !== null) {
$bar .= $this->foo;
}
}
}Expected Behaviour
The $foo property should be marked as readonly