Skip to content
This repository was archived by the owner on Aug 11, 2025. It is now read-only.

Commit 31d2604

Browse files
authored
Merge pull request #117 from opentracing/fixes_with_baggage_items
fix: fixes the return type for withBaggageItems.
2 parents d2466a2 + 450cfd9 commit 31d2604

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/OpenTracing/Mock/MockSpanContext.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
namespace OpenTracing\Mock;
66

7-
use ArrayIterator;
87
use OpenTracing\SpanContext;
8+
use ArrayIterator;
99

1010
final class MockSpanContext implements SpanContext
1111
{
@@ -88,7 +88,7 @@ public function getBaggageItem(string $key): ?string
8888
/**
8989
* {@inheritdoc}
9090
*/
91-
public function withBaggageItem(string $key, string $value): ?SpanContext
91+
public function withBaggageItem(string $key, string $value): SpanContext
9292
{
9393
return new self($this->traceId, $this->spanId, $this->isSampled, array_merge($this->items, [$key => $value]));
9494
}

src/OpenTracing/NoopSpanContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function getBaggageItem(string $key): ?string
2727
/**
2828
* {@inheritdoc}
2929
*/
30-
public function withBaggageItem(string $key, string $value): ?SpanContext
30+
public function withBaggageItem(string $key, string $value): SpanContext
3131
{
3232
return new self();
3333
}

src/OpenTracing/SpanContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ public function getBaggageItem(string $key): ?string;
3333
* @param string $value
3434
* @return SpanContext
3535
*/
36-
public function withBaggageItem(string $key, string $value): ?SpanContext;
36+
public function withBaggageItem(string $key, string $value): SpanContext;
3737
}

0 commit comments

Comments
 (0)