Skip to content

Commit af8cd18

Browse files
authored
Merge pull request #6 from fulll/sf5
2 parents db0df68 + e643c8b commit af8cd18

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/Domain/Consumer/Consumer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ public function consume($command = null)
5858
}
5959

6060
$this->eventDispatcher->dispatch(
61-
Event\Events::ON_CONSUMER_RESPONSE,
62-
new Event\OnConsumerResponseEvent($this->commandBus->getHandleType(), $response)
61+
new Event\OnConsumerResponseEvent($this->commandBus->getHandleType(), $response),
62+
Event\Events::ON_CONSUMER_RESPONSE
6363
);
6464

6565
return $response;

src/Domain/EventDispatcherBus.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,22 @@ public function handle(CommandInterface $command, $priority = null)
2727
{
2828
try {
2929
$this->eventDispatcher->dispatch(
30-
Event\Events::PRE_HANDLE_COMMAND,
31-
new Event\PreHandleCommandEvent($this->getHandleType(), $command)
30+
new Event\PreHandleCommandEvent($this->getHandleType(), $command),
31+
Event\Events::PRE_HANDLE_COMMAND
3232
);
3333

3434
$result = $this->delegateCommandBus->handle($command, $priority);
3535

3636
$this->eventDispatcher->dispatch(
37-
Event\Events::ON_DIRECT_RESPONSE,
38-
new Event\OnDirectResponseEvent($this->getHandleType(), new Response($command, Response::SUCCESS))
37+
new Event\OnDirectResponseEvent($this->getHandleType(), new Response($command, Response::SUCCESS)),
38+
Event\Events::ON_DIRECT_RESPONSE
3939
);
4040

4141
return $result;
4242
} catch (\Exception $e) {
4343
$this->eventDispatcher->dispatch(
44-
Event\Events::ON_DIRECT_RESPONSE,
45-
new Event\OnDirectResponseEvent($this->getHandleType(), new Response($command, Response::FAILED, $e))
44+
new Event\OnDirectResponseEvent($this->getHandleType(), new Response($command, Response::FAILED, $e)),
45+
Event\Events::ON_DIRECT_RESPONSE
4646
);
4747

4848
throw $e;

0 commit comments

Comments
 (0)