-
-
Notifications
You must be signed in to change notification settings - Fork 742
Closed
rectorphp/rector-src
#4359Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | 0.17.1 |
| Installed as | composer dependency |
Minimal PHP Code Causing Issue
See https://getrector.com/demo/71ddafa6-c5f7-49b7-a33f-a80fdb945510
<?php
final class DemoFile
{
private string $env;
public function __construct()
{
$this->env = 'default';
}
public function getEnv(): string
{
return $this->env;
}
public static function create(string $env): self
{
$object = new self();
$object->env = 'not default';
return $object;
}
}Responsible rules
ReadOnlyPropertyRector
Expected Behavior
The property $env should not be considered as readonly as it is modified in a specific method.
Reactions are currently unavailable