| Total Complexity | 10 |
| Total Lines | 61 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class Span implements SpanInterface |
||
| 10 | { |
||
| 11 | private ?Status $status = null; |
||
| 12 | |||
| 13 | 155 | public function __construct( |
|
| 17 | } |
||
| 18 | |||
| 19 | 3 | public function getName(): string |
|
| 20 | { |
||
| 21 | 3 | return $this->name; |
|
| 22 | } |
||
| 23 | |||
| 24 | 1 | public function updateName(string $name): self |
|
| 25 | { |
||
| 26 | 1 | $this->name = $name; |
|
| 27 | |||
| 28 | 1 | return $this; |
|
| 29 | } |
||
| 30 | |||
| 31 | 5 | public function getAttributes(): array |
|
| 34 | } |
||
| 35 | |||
| 36 | 147 | public function setAttributes(array $attributes): self |
|
| 37 | { |
||
| 38 | 147 | $this->attributes = $attributes; |
|
| 39 | |||
| 40 | 147 | return $this; |
|
| 41 | } |
||
| 42 | |||
| 43 | 117 | public function setAttribute(string $name, mixed $value): self |
|
| 44 | { |
||
| 45 | 117 | $this->attributes[$name] = $value; |
|
| 46 | |||
| 47 | 117 | return $this; |
|
| 48 | } |
||
| 49 | |||
| 50 | 1 | public function hasAttribute(string $name): bool |
|
| 51 | { |
||
| 52 | 1 | return isset($this->attributes[$name]); |
|
| 53 | } |
||
| 54 | |||
| 55 | 1 | public function getAttribute(string $name): mixed |
|
| 58 | } |
||
| 59 | |||
| 60 | 98 | public function setStatus(string|int $code, string $description = null): self |
|
| 65 | } |
||
| 66 | |||
| 67 | 3 | public function getStatus(): ?Status |
|
| 70 | } |
||
| 71 | } |
||
| 72 |