Bug Report
| Subject |
Details |
| Rector version |
v 2.2.11 |
Description:
If a Function returns ClassA|ClassB, Rector will always use the first one, to rename the Variables.
In my example I am using:
$ffmpeg = FFMpeg::create();
$video = $ffmpeg->open(Storage::disk('media')->path($this->path));
from FFMpeg::open header: * @return Audio|Video
Rector will rename my variable $video to $audio
Reproduce
Demo does not make changes, probably because FFMpeg is not found.
I have attached my console output to the demo
https://getrector.com/demo/38133f09-9257-41cb-becd-0742d6edf8c2
Expected Behaviour
I expect Rector to allow $audio and $video as possible variable names in this case specific case.
For other similar cases, I expect Rector to allow all possible return types as variable names