Answer the question
In order to leave comments, you need to log in
How to teach PhpStorm to understand __callStatic?
The project has an implementation similar to facades in Laravel.
The essence is exactly the same: get a static interface to services from the container. Under the hood, __callStatic works, which looks for the desired service and calls it using call_user_func_array .
Of course, the called method is not directly in the class that implements this interface, and PhpStorm, when using this approach, indicates the error Method not found in... Accordingly, there is no autocomplete or other conveniences.
What can be done to resolve this?
(The project itself is not on Laravel, so using the https://github.com/barryvdh/laravel-ide-helper solution will not work).
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question