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

ReturnTypeFromStrictTypedCallRector infers static return type as static in caller #8348

Closed
Sparclex opened this issue Dec 11, 2023 · 0 comments · Fixed by rectorphp/rector-src#5357
Labels

Comments

@Sparclex
Copy link

Sparclex commented Dec 11, 2023

Bug Report

Subject Details
Rector version 0.18.12

When calling a method which has a return type :static it adds the static return type to the caller class instead of ClassName.

Minimal PHP Code Causing Issue

See https://getrector.com/demo/0c2808db-5ce8-4d74-b311-1a9f30890312

Expected Behaviour

It should add the return type : ClassName to the caller class. In the demo case it should add : SomeNamedConstructorClass

I already added a failing test case here: rectorphp/rector-src#5353

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