diff --git a/src/CommandBusInterface.php b/src/CommandBusInterface.php index eaac8a6..2ff11db 100644 --- a/src/CommandBusInterface.php +++ b/src/CommandBusInterface.php @@ -6,5 +6,11 @@ interface CommandBusInterface { + /** + * @template TResult + * @param CommandInterface $command + * + * @return TResult + */ public function dispatch(CommandInterface $command): mixed; } diff --git a/src/CommandInterface.php b/src/CommandInterface.php index dc9ad77..a783894 100644 --- a/src/CommandInterface.php +++ b/src/CommandInterface.php @@ -4,6 +4,9 @@ namespace Spiral\Cqrs; +/** + * @template TResult + */ interface CommandInterface { diff --git a/src/QueryBusInterface.php b/src/QueryBusInterface.php index e9bf762..c5a52cb 100644 --- a/src/QueryBusInterface.php +++ b/src/QueryBusInterface.php @@ -6,5 +6,11 @@ interface QueryBusInterface { + /** + * @template TResult + * @param QueryInterface $query + * + * @return TResult + */ public function ask(QueryInterface $query): mixed; } diff --git a/src/QueryInterface.php b/src/QueryInterface.php index 2d983a7..445fc45 100644 --- a/src/QueryInterface.php +++ b/src/QueryInterface.php @@ -4,6 +4,9 @@ namespace Spiral\Cqrs; +/** + * @template TResult + */ interface QueryInterface {