Total Complexity | 7 |
Total Lines | 94 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | final class Span implements \JsonSerializable |
||
6 | { |
||
7 | /** |
||
8 | * @var string |
||
9 | */ |
||
10 | private $transactionId; |
||
11 | |||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | private $type; |
||
16 | |||
17 | /** |
||
18 | * @var string|null |
||
19 | */ |
||
20 | private $subType; |
||
21 | |||
22 | /** |
||
23 | * @var int |
||
24 | */ |
||
25 | private $count; |
||
26 | |||
27 | /** |
||
28 | * @var double |
||
29 | */ |
||
30 | private $sum; |
||
31 | |||
32 | /** |
||
33 | * @param string $transactionId |
||
34 | * @param string $type |
||
35 | * @param string|null $subType |
||
36 | * @param int $count |
||
37 | * @param double $sum |
||
38 | */ |
||
39 | 7 | public function __construct($transactionId, $type, $subType, $count, $sum) |
|
40 | { |
||
41 | 7 | $this->transactionId = $transactionId; |
|
42 | 7 | $this->type = $type; |
|
43 | 7 | $this->subType = $subType; |
|
44 | 7 | $this->count = $count; |
|
45 | 7 | $this->sum = $sum; |
|
46 | 7 | } |
|
47 | |||
48 | /** |
||
49 | * @return string |
||
50 | */ |
||
51 | 4 | public function transactionId() |
|
52 | { |
||
53 | 4 | return $this->transactionId; |
|
54 | } |
||
55 | |||
56 | /** |
||
57 | * @return string |
||
58 | */ |
||
59 | 4 | public function type() |
|
60 | { |
||
61 | 4 | return $this->type; |
|
62 | } |
||
63 | |||
64 | /** |
||
65 | * @return string|null |
||
66 | */ |
||
67 | 4 | public function subType() |
|
68 | { |
||
69 | 4 | return $this->subType; |
|
70 | } |
||
71 | |||
72 | /** |
||
73 | * @return int |
||
74 | */ |
||
75 | 4 | public function count() |
|
76 | { |
||
77 | 4 | return $this->count; |
|
78 | } |
||
79 | |||
80 | /** |
||
81 | * @return double |
||
82 | */ |
||
83 | 4 | public function sum() |
|
86 | } |
||
87 | |||
88 | /** |
||
89 | * @return array |
||
90 | */ |
||
91 | 1 | public function jsonSerialize() |
|
102 |