# Bug Report <!-- First, thank you for reporting a bug. That takes time and we appreciate that! --> | Subject | Details | | :------------- | :--------------------| | Rector version | last dev-master | | Installed as | composer dependency | ## Minimal PHP Code Causing Issue See https://getrector.org/demo/1e2cb1b3-8dd5-46fc-925b-1df01d0b73c0 ```php <?php final class DemoFile { public function __construct(private Converter $converter) { if ($this->converter instanceof CacheableConverter) { $this->converter = clone $this->converter; $this->converter->reset(); } } } ``` ### Responsible rules * `ReadOnlyPropertyRector` ## Expected Behavior Rector should skip it as the `converter` parameter is conditionally changed inside the constructor code.
Bug Report
Minimal PHP Code Causing Issue
See https://getrector.org/demo/1e2cb1b3-8dd5-46fc-925b-1df01d0b73c0
Responsible rules
ReadOnlyPropertyRectorExpected Behavior
Rector should skip it as the
converterparameter is conditionally changed inside the constructor code.