You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reprinting doc is by phpstan's phpdoc-parser, so add the parentheses on union under @method param definition on print seems expected there, probably related with issue phpstan/phpdoc-parser#74.
Not really an issue when read by phpstan afaik. Not sure if it worth tweak on rector side.
Bug Report
Using importNames is bugged when parameters in docblock are union types
Minimal PHP Code Causing Issue
https://getrector.com/demo/cf0e000e-4926-4427-9bad-6193e6ff4a58
Expected Behaviour
Original phpdoc:
The resulting phpdoc after executing rector is:
This is wrong (the parenthesis is wrong), the code should be:
The text was updated successfully, but these errors were encountered: