IDE Intellisense for Method Chaining (PhpStorm)

For straight phalcon calls, the use of the stubs for IDE's works fine. I'm using PhpStorm, in which I have also installed the Phalcon autocomplete plugin. For a method chain of Model::query()->...->execute(), however, the result type is not recognized. In the case below:

edited 13d ago

You need to add phpdocs on planUnits or planUnit, no other way around this. When using ::query phalcon uses Criteria class which returns just ResultsetInerface

The only way around this could be phpstorm extension which could detect on what ::query() was called and provide correct return type for execute method. As far as i know otherwise using phpdocc there is no way to return correct type for execute method other then of course overwriting ::query method and create seperated criteria class for each model, but i guess you won't to do this.