Builder   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 2 Features 0
Metric Value
eloc 6
c 3
b 2
f 0
dl 0
loc 18
ccs 7
cts 7
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getTracer() 0 3 1
A setSpanContext() 0 4 1
A create() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace OpenTelemetry\Tracing;
6
7
class Builder
8
{
9
    private $spanContext;
10
11 1
    public static function create()
12
    {
13 1
        return new self();
14
    }
15
16 1
    public function setSpanContext(SpanContext $spanContext): self
17
    {
18 1
        $this->spanContext = $spanContext;
19 1
        return $this;
20
    }
21
22 1
    public function getTracer()
23
    {
24 1
        return new Tracer($this->spanContext);
25
    }
26
}
27