@@ -29,6 +29,12 @@ public function __construct(
2929 );
3030 }
3131
32+ public function teardown (): void
33+ {
34+ $ this ->channel ->close ();
35+ $ this ->connection ->stop ();
36+ }
37+
3238 public static function withoutAuthentication (
3339 string $ stepUuid ,
3440 string $ host ,
@@ -71,10 +77,10 @@ public static function withAuthentication(
7177 return new self ($ connection , stepUuid: $ stepUuid , topic: $ topic , exchange: $ exchange );
7278 }
7379
74- public function reject (StepCodeInterface $ step , object | array $ rejection , ?\Throwable $ exception = null ): void
80+ public function reject (StepCodeInterface $ step , array | object $ rejection , ?\Throwable $ exception = null ): void
7581 {
7682 $ this ->channel ->publish (
77- json_encode ([
83+ \ json_encode ([
7884 'item ' => $ rejection ,
7985 'exception ' => $ exception ,
8086 'step ' => $ this ->stepUuid ,
@@ -87,10 +93,10 @@ public function reject(StepCodeInterface $step, object|array $rejection, ?\Throw
8793 );
8894 }
8995
90- public function rejectWithReason (StepCodeInterface $ step , object | array $ rejection , string $ reason , ?\Throwable $ exception = null ): void
96+ public function rejectWithReason (StepCodeInterface $ step , array | object $ rejection , string $ reason , ?\Throwable $ exception = null ): void
9197 {
9298 $ this ->channel ->publish (
93- json_encode ([
99+ \ json_encode ([
94100 'item ' => $ rejection ,
95101 'exception ' => $ exception ,
96102 'step ' => $ this ->stepUuid ,
@@ -113,10 +119,4 @@ public function initialize(): void
113119 autoDelete: true ,
114120 );
115121 }
116-
117- public function teardown (): void
118- {
119- $ this ->channel ->close ();
120- $ this ->connection ->stop ();
121- }
122122}
0 commit comments