| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | public function injectParentSpanToCommand(object $command): object |
||
| 20 | { |
||
| 21 | $tracingContextField = JobTracingMiddleware::JOB_TRACING_CONTEXT_FIELD; |
||
| 22 | |||
| 23 | if (isset($command->{$tracingContextField})) { |
||
| 24 | return $command; |
||
| 25 | } |
||
| 26 | |||
| 27 | $command->{$tracingContextField} = []; |
||
| 28 | $this->contextPropagator->inject($command->{$tracingContextField}); |
||
| 29 | |||
| 30 | return $command; |
||
| 31 | } |
||
| 33 |