3 ms·
With wordpress in order to add a hook when building a plugin you need to specify the class name and method to call in an array with 2 elements. PHPStorm can't r
by kyriakos 11y ago
With wordpress in order to add a hook when building a plugin you need to specify the class name and method to call in an array with 2 elements. PHPStorm can't really peer into it.
Then I also use Laravel's Eloquent outside Laravel, models don't get auto complete in that case either. e.g. if you do a $user = User::find(1); PHPStorm doesn't understand that $user is an instance of User class unless you explicitly tell it. Apparently if you use the whole Laravel framework there is a CLI utility that adds annotations to you and fixes this issue.
- spdionis 11y agoYes, that happens, and the occasional annotation is bit annoying yet very effective.