-
Notifications
You must be signed in to change notification settings - Fork 6
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
fetchTable()
does not properly resolve when used via LocatorAwareTrait in a service class
#12
Comments
Just looked through the other issues and this is related to phpstan not supporting trait methods via DynamicReturnTypeExtension |
Yes, trait is not supported. If you have a base Service class that uses LocatorAwareTrait you could have phpstan config as it is done at https://github.com/CakeDC/cakephp-phpstan/blob/master/extension.neon#L13 |
yea, i have always defaulted to |
Is there a solution for traits and fetchTable() yet? |
I could not find a good solution for this issue. |
Interesting:
works, but
and
results in
Probably the defaultTable property should be read for empty argument? |
Yes, sent #19 |
Closed per #19, please reopen if needed. Thanks, |
does give the following error
but the same 3 lines inside e.g. a controller action work fine.
The text was updated successfully, but these errors were encountered: