for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace EventSauce\EventSourcing;
abstract class EventConsumer implements Consumer
{
public function handle(Message $message): void
$event = $message->event();
$parts = explode('\\', get_class($event));
$method = 'handle' . end($parts);
if (method_exists($this, $method)) {
$this->{$method}($event, $message);
}