Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | public function handle(Envelope $envelope, StackInterface $stack): Envelope |
||
22 | { |
||
23 | if (isset($envelope->all()[CorrelationIdStamp::class])) { |
||
24 | return $stack->next()->handle($envelope, $stack); |
||
25 | } |
||
26 | |||
27 | $envelope = $envelope->with( |
||
28 | new CorrelationIdStamp(CorrelationID::toString()) |
||
29 | ); |
||
30 | |||
31 | return $stack->next()->handle($envelope, $stack); |
||
32 | } |
||
34 |