-
-
Notifications
You must be signed in to change notification settings - Fork 742
Closed
rectorphp/rector-src
#7884Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | last dev-main |
| Installed as | composer dependency |
Minimal PHP Code Causing Issue
See https://getrector.com/demo/67a7213b-f6ae-45c2-bf4c-6b9c789f11b8
<?php
class MyActionController {}
class MyClxProductNet_Translate {
/**
* @phpstan-pure
*/
public static function create(): self
{
return new self();
}
}
/** @var MyActionController $this */
/** @var MyClxProductNet_Translate $translator */
$translator = MyClxProductNet_Translate::create();
$url = $this->bulkConsumerRegistration ?? "abc";Responsible rules
RemoveUselessVarTagRector
Expected Behavior
/** @var MyActionController $this */ should not be removed because $this is used within the file.
removing this comment will create PHPStan errors, because in the context of this non-class files $this is otherwise not known to PHPStan
Reactions are currently unavailable