diff --git a/examples/FunctionalFlavour/ExampleFunctionalPort.php b/examples/FunctionalFlavour/ExampleFunctionalPort.php index 5b97678..5543689 100644 --- a/examples/FunctionalFlavour/ExampleFunctionalPort.php +++ b/examples/FunctionalFlavour/ExampleFunctionalPort.php @@ -62,10 +62,10 @@ public function decorateEvent($customEvent): MessageBag /** * {@inheritdoc} */ - public function getAggregateIdFromCustomCommand(string $aggregateIdPayloadKey, $customCommand): string + public function getAggregateIdFromCommand(string $aggregateIdPayloadKey, $command): string { //Duck typing, do not do this in production but rather use your own interfaces - return $customCommand->{$aggregateIdPayloadKey}; + return $command->{$aggregateIdPayloadKey}; } /** diff --git a/src/Runtime/Functional/Port.php b/src/Runtime/Functional/Port.php index 6f18a0a..090b499 100644 --- a/src/Runtime/Functional/Port.php +++ b/src/Runtime/Functional/Port.php @@ -36,10 +36,10 @@ public function decorateEvent($customEvent): MessageBag; /** * @param string $aggregateIdPayloadKey - * @param mixed $customCommand + * @param mixed $command * @return string */ - public function getAggregateIdFromCustomCommand(string $aggregateIdPayloadKey, $customCommand): string; + public function getAggregateIdFromCommand(string $aggregateIdPayloadKey, $command): string; /** * @param mixed $customCommand diff --git a/src/Runtime/FunctionalFlavour.php b/src/Runtime/FunctionalFlavour.php index 44df5b8..7618a18 100644 --- a/src/Runtime/FunctionalFlavour.php +++ b/src/Runtime/FunctionalFlavour.php @@ -93,7 +93,7 @@ public function getAggregateIdFromCommand(string $aggregateIdPayloadKey, Message throw new RuntimeException('Message passed to ' . __METHOD__ . ' should be of type ' . MessageBag::class); } - return $this->port->getAggregateIdFromCustomCommand($aggregateIdPayloadKey, $command->get(MessageBag::MESSAGE)); + return $this->port->getAggregateIdFromCommand($aggregateIdPayloadKey, $command->get(MessageBag::MESSAGE)); } /**