As discussed at WI-6027 Generic support for factory design pattern in PHP chaining (e.g. Magento, Doctrine, Kohana, ZF2, etc..)
Imagine you have something like these "service" or "helper" provider interfaces/objects
You can make the following cases to work:
By using example metadata below. It can reside anywhere, but we recommend using .phpstorm.meta.php file in project root.
We use PHP code as a config - so we can use existing API to analyse it. The specific format is chosen also to facilitate existing editor features to help as much as possible - completion works, references are resolved, usage search and refactoring will work too.