Skip to content

Component::lookup nullable when $need=false #17

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

Merged
merged 1 commit into from
May 20, 2018

Conversation

adaamz
Copy link
Contributor

@adaamz adaamz commented Mar 20, 2018

Nette\ComponentModel\Component:lookup return type is based on second parameter ($need). When $need is false then return type is IComponent|null.

btw. I would to add feature to directly know return type based on first parameter $class. Is it possible to get it now? I know the case when MyComponentClass::class is passed... but when it is some function call (for which phpstan has extension for example), is it possible?

@ondrejmirtes
Copy link
Member

Hi, I will review this once the build succeeds.

@adaamz adaamz force-pushed the patch-1 branch 3 times, most recently from caa7b74 to 194171d Compare April 30, 2018 14:24
@adaamz
Copy link
Contributor Author

adaamz commented Apr 30, 2018

@ondrejmirtes Build is green 🎉

@ondrejmirtes
Copy link
Member

This is weird - where's the code? 😊
screen shot 2018-05-01 at 13 22 51

@adaamz
Copy link
Contributor Author

adaamz commented May 5, 2018

@ondrejmirtes Code is here 🎉

@ondrejmirtes ondrejmirtes merged commit ecab3bd into phpstan:master May 20, 2018
@ondrejmirtes
Copy link
Member

Thanks!

@adaamz adaamz deleted the patch-1 branch May 20, 2018 20:52
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.

2 participants