PhpStorm does not provide return type detection for Interop\Container\ContainerInterface
-like DI-containers as used in Zend Framework or Zend Expressive for example.
This can be archived by adding a PhpStorm Advanced Metadata configuration file to your project.
- Create a file named
.phpstorm.meta.php
in your project root directory - Add custom mappings if a service id is not equal to it's classname