-
-
Notifications
You must be signed in to change notification settings - Fork 737
Closed
rectorphp/rector-src
#2837Labels
Description
Bug Report
Rector removes some useful @var comments, which were added to make static analysis tools like Psalm and PHPStan happy.
| Subject | Details |
|---|---|
| Rector version | v0.14.0 |
| Installed as | composer dependency |
Minimal PHP Code Causing Issue
See https://getrector.org/demo/b8211831-e437-4bd9-a844-266787f6d95f
<?php
final class DemoFile
{
public function run()
{
/** @var object{foo: string} $json */
$json = json_decode('{"foo": "bar"}', false);
}
}Responsible rules
RemoveNonExistingVarAnnotationRector
Expected Behavior
Rector should not remove this comment, because it's useful for static analysis tools.
TomasVotruba