-
Notifications
You must be signed in to change notification settings - Fork 27
Add FQCN support to implementsInterface
#144
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
Add FQCN support to implementsInterface
#144
Conversation
2f904da
to
e10744b
Compare
e10744b
to
5da43bc
Compare
5da43bc
to
03ceb86
Compare
If you want a simple fix for a long outstanding bug, this is it 😊 |
Can you please remove the changes in Thanks! |
interesting, indeed it understands more now, I get those failures
looks like objects are not working because of the |
The annotation and the implementation suggests to me that only strings can ever work there... |
annotation yeah, |
anyways, I think it would still close the linked issues by using only phpstan 1.9.0 assert annotations, I'll adapt this |
Oh I get it now, yeah, objects are indeed supported. Please try to send a PR to the library :) |
Until then, our extension is superior :) |
Closes #17
Closes #18
The idea behind this is amazingly simple. If the
$class
arg is a known interface we can simply useis_subclass_of
to check if the given object or FQCN implements that interface.