| Conditions | 3 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 58 | 2 | public function jsonSerialize() |
|
| 59 | { |
||
| 60 | $payload = [ |
||
| 61 | 2 | 'timestamp' => $this->timestamp, |
|
| 62 | 2 | 'samples' => $this->samples, |
|
| 63 | 2 | 'transaction' => $this->transaction, |
|
| 64 | 2 | ]; |
|
| 65 | |||
| 66 | 2 | if (null !== $this->span) { |
|
| 67 | 2 | $payload['span'] = $this->span; |
|
| 68 | 2 | } |
|
| 69 | |||
| 70 | 2 | if (null !== $this->tags) { |
|
| 71 | 1 | $payload['tags'] = $this->tags; |
|
| 72 | 1 | } |
|
| 73 | |||
| 74 | return [ |
||
| 75 | 2 | 'metricset' => $payload, |
|
| 76 | 2 | ]; |
|
| 79 |