| Total Complexity | 10 |
| Total Lines | 64 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | final class Span implements SpanInterface |
||
| 14 | { |
||
| 15 | private ?Status $status = null; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param non-empty-string $name |
||
|
|
|||
| 19 | */ |
||
| 20 | 160 | public function __construct( |
|
| 24 | } |
||
| 25 | |||
| 26 | 3 | public function getName(): string |
|
| 27 | { |
||
| 28 | 3 | return $this->name; |
|
| 29 | } |
||
| 30 | |||
| 31 | 1 | public function updateName(string $name): self |
|
| 32 | { |
||
| 33 | 1 | $this->name = $name; |
|
| 34 | |||
| 35 | 1 | return $this; |
|
| 36 | } |
||
| 37 | |||
| 38 | 5 | public function getAttributes(): array |
|
| 41 | } |
||
| 42 | |||
| 43 | 152 | public function setAttributes(array $attributes): self |
|
| 44 | { |
||
| 45 | 152 | $this->attributes = $attributes; |
|
| 46 | |||
| 47 | 152 | return $this; |
|
| 48 | } |
||
| 49 | |||
| 50 | 117 | public function setAttribute(string $name, mixed $value): self |
|
| 51 | { |
||
| 52 | 117 | $this->attributes[$name] = $value; |
|
| 53 | |||
| 54 | 117 | return $this; |
|
| 55 | } |
||
| 56 | |||
| 57 | 1 | public function hasAttribute(string $name): bool |
|
| 58 | { |
||
| 59 | 1 | return isset($this->attributes[$name]); |
|
| 60 | } |
||
| 61 | |||
| 62 | 1 | public function getAttribute(string $name): mixed |
|
| 65 | } |
||
| 66 | |||
| 67 | 98 | public function setStatus(string|int $code, string $description = null): self |
|
| 72 | } |
||
| 73 | |||
| 74 | 3 | public function getStatus(): ?Status |
|
| 77 | } |
||
| 78 | } |
||
| 79 |