for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace EventSauce\EventSourcing;
class EventRecorder
{
/** @var callable(object) */
private $recorder;
public function __construct(callable $recorder)
$this->recorder = $recorder;
}
public function recordThat(object $event): void
call_user_func($this->recorder, $event);