diff --git a/Classes/EventListener/Mapping/EventToListenerMapping.php b/Classes/EventListener/Mapping/EventToListenerMapping.php index 2d51d0f..305082e 100644 --- a/Classes/EventListener/Mapping/EventToListenerMapping.php +++ b/Classes/EventListener/Mapping/EventToListenerMapping.php @@ -71,7 +71,7 @@ public function getOption(string $optionName, $defaultValue) /** * @inheritDoc */ - public function jsonSerialize() + public function jsonSerialize(): array { return [ 'eventClassName' => $this->eventClassName, diff --git a/Classes/EventListener/Mapping/EventToListenerMappings.php b/Classes/EventListener/Mapping/EventToListenerMappings.php index 05156ac..717e798 100644 --- a/Classes/EventListener/Mapping/EventToListenerMappings.php +++ b/Classes/EventListener/Mapping/EventToListenerMappings.php @@ -84,7 +84,7 @@ public function getIterator(): \Iterator return new \ArrayIterator($this->mappings); } - public function jsonSerialize() + public function jsonSerialize(): array { return $this->mappings; } diff --git a/Classes/EventStore/EventStream.php b/Classes/EventStore/EventStream.php index b5a1cd6..925086e 100644 --- a/Classes/EventStore/EventStream.php +++ b/Classes/EventStore/EventStream.php @@ -71,7 +71,7 @@ public function next(): void $this->streamIterator->next(); } - public function key() + public function key(): float|bool|int|string|null { return $this->streamIterator->key(); } diff --git a/Classes/EventStore/Storage/InMemory/InMemoryStreamIterator.php b/Classes/EventStore/Storage/InMemory/InMemoryStreamIterator.php index 34e9d1f..1229264 100644 --- a/Classes/EventStore/Storage/InMemory/InMemoryStreamIterator.php +++ b/Classes/EventStore/Storage/InMemory/InMemoryStreamIterator.php @@ -76,9 +76,9 @@ public function next(): void } /** - * @return bool|int + * @return bool|int|null */ - public function key() + public function key(): bool|int|null { return $this->innerIterator->valid() ? $this->innerIterator->current()['sequencenumber'] : null; }