Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

samsonasik
Copy link
Member

@samsonasik
Copy link
Member Author

Fixed 🎉 /cc @staabm

@samsonasik
Copy link
Member Author

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

@TomasVotruba
Copy link
Member

TomasVotruba commented Oct 26, 2024

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);

@samsonasik
Copy link
Member Author

samsonasik commented Oct 26, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect behavior of ParamTypeByMethodCallTypeRector
2 participants