Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | public function retrieve(array $carrier, $headerName = TraceContextPropagator::TRACEPARENT): ?string |
||
12 | { |
||
13 | if (empty($carrier[$headerName])) { |
||
14 | return null; |
||
15 | } |
||
16 | |||
17 | if (is_array($carrier[$headerName])) { |
||
18 | return $carrier[$headerName][0]; |
||
19 | } |
||
20 | |||
21 | return $carrier[$headerName]; |
||
22 | } |
||
24 |