phpstan-drupal
phpstan-drupal copied to clipboard
Provide parameter type inspection for entity hooks
WHen there is a hook_entity_* hook, verify the parameter has a type hint to EntityInterface.
If we encounter hook_ENTITY_TYPE_*, check if the parameter is still EntityInterface, flag for a more appropriate interface. We only map the concrete class, and it could be swapped.