@@ -27,22 +27,22 @@ public function handle(CommandInterface $command, $priority = null)
27
27
{
28
28
try {
29
29
$ 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
32
32
);
33
33
34
34
$ result = $ this ->delegateCommandBus ->handle ($ command , $ priority );
35
35
36
36
$ 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
39
39
);
40
40
41
41
return $ result ;
42
42
} catch (\Exception $ e ) {
43
43
$ 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
46
46
);
47
47
48
48
throw $ e ;
0 commit comments