diff --git a/src/Lifecycle/Broker.php b/src/Lifecycle/Broker.php index 2585ace1..3ebcd47b 100644 --- a/src/Lifecycle/Broker.php +++ b/src/Lifecycle/Broker.php @@ -20,8 +20,7 @@ public function __construct( protected MetadataManager $metadata, protected EventQueue $queue, protected StateManager $states, - ) { - } + ) {} public function fireIfValid(Event $event): ?Event { @@ -78,7 +77,7 @@ public function commit(): bool return $this->commit(); } - public function replay(callable $beforeEach = null, callable $afterEach = null): void + public function replay(?callable $beforeEach = null, ?callable $afterEach = null): void { $this->is_replaying = true; diff --git a/src/Lifecycle/EventStore.php b/src/Lifecycle/EventStore.php index c4f79808..e2a65dbb 100644 --- a/src/Lifecycle/EventStore.php +++ b/src/Lifecycle/EventStore.php @@ -23,12 +23,11 @@ class EventStore implements StoresEvents { public function __construct( protected MetadataManager $metadata, - ) { - } + ) {} public function read( - State $state = null, - Bits|UuidInterface|AbstractUid|int|string $after_id = null, + ?State $state = null, + Bits|UuidInterface|AbstractUid|int|string|null $after_id = null, bool $singleton = false, ): LazyCollection { return $this->readEvents($state, $after_id, $singleton)