Skip to content

Commit

Permalink
Rename Functional\Port::getAggregateIdFromCustomCommand rm Custom
Browse files Browse the repository at this point in the history
  • Loading branch information
codeliner committed Nov 17, 2018
1 parent 68a6b2f commit 9f022cf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/FunctionalFlavour/ExampleFunctionalPort.php
Original file line number Diff line number Diff line change
Expand Up @@ -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};
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Runtime/Functional/Port.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Runtime/FunctionalFlavour.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

/**
Expand Down

0 comments on commit 9f022cf

Please sign in to comment.