rector-src icon indicating copy to clipboard operation
rector-src copied to clipboard

[TypeDeclaration] Skip mixed as on right of and on ParamTypeByMethodCallTypeRector

Open samsonasik opened this issue 1 year ago • 4 comments

Fixes https://github.com/rectorphp/rector/issues/8872

samsonasik avatar Oct 26 '24 15:10 samsonasik

Fixed 🎉 /cc @staabm

samsonasik avatar Oct 26 '24 15:10 samsonasik

All checks have passed 🎉 @TomasVotruba I think it is ready.

samsonasik avatar Oct 26 '24 15:10 samsonasik

I think this is rather specific fix that will fail for slightly different code syntax. There should be check for first type of $code or if the value type changed.

How would this behave with negated value?

$ok = ! \is_string($code) && self::isCodeOk($code);

TomasVotruba avatar Oct 26 '24 16:10 TomasVotruba

negation check is invalid and will cause fatal error on the first place, since it typed param string on caller, see:

https://3v4l.org/Ouift

samsonasik avatar Oct 26 '24 16:10 samsonasik

Let's ship it and see how to goes :+1:

TomasVotruba avatar Nov 21 '24 10:11 TomasVotruba