IntelliJ Platform Plugin SDK
 
IntelliJ Platform Explorer

PHP Type Providers

Edit pageLast modified: 09 April 2024

Type inference in PhpStorm is built on top of type providers, each of which is responsible for inferring the types of specific PSI elements. For example, com.jetbrains.php.lang.psi.resolve.types.PhpArrayAccessTP is responsible for inferring the types of expressions like $arr[10]. There are dozens of such providers, and they all work one after another to provide type information when needed.

All providers inherit from com.jetbrains.php.lang.psi.resolve.types.PhpTypeProvider4, which is registered in the com.jetbrains.php.typeProvider4 extension point.