phpstan-drupal icon indicating copy to clipboard operation
phpstan-drupal copied to clipboard

Provide parameter type inspection for entity hooks

Open mglaman opened this issue 3 years ago • 0 comments

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.

mglaman avatar Feb 14 '22 02:02 mglaman