Currently to have a good code in rules, we need to check if the event is an instance of the event we expect. (required at least by phpstan)
We could improve the situation by replacing DomainEvent by DomainEventInterface, because we can use children interface as type afterwards.
Currently to have a good code in rules, we need to check if the event is an instance of the event we expect. (required at least by phpstan)
We could improve the situation by replacing DomainEvent by DomainEventInterface, because we can use children interface as type afterwards.