Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
46 | 12 | private function generateSpanInstance($name, SpanContext $context): Span |
|
47 | { |
||
48 | 12 | $parent = null; |
|
49 | 12 | if ($this->active) { |
|
50 | 9 | $parent = $this->getActiveSpan()->getSpanContext(); |
|
51 | } |
||
52 | 12 | $span = new Span($name, $context, $parent); |
|
53 | 12 | $this->spans[] = $span; |
|
54 | 12 | return $span; |
|
55 | } |
||
57 |