Skip to content

Commit

Permalink
fix: fixes the return type for withBaggageItems.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcchavezs committed Jan 5, 2021
1 parent d2466a2 commit 450cfd9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/OpenTracing/Mock/MockSpanContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace OpenTracing\Mock;

use ArrayIterator;
use OpenTracing\SpanContext;
use ArrayIterator;

final class MockSpanContext implements SpanContext
{
Expand Down Expand Up @@ -88,7 +88,7 @@ public function getBaggageItem(string $key): ?string
/**
* {@inheritdoc}
*/
public function withBaggageItem(string $key, string $value): ?SpanContext
public function withBaggageItem(string $key, string $value): SpanContext
{
return new self($this->traceId, $this->spanId, $this->isSampled, array_merge($this->items, [$key => $value]));
}
Expand Down
2 changes: 1 addition & 1 deletion src/OpenTracing/NoopSpanContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function getBaggageItem(string $key): ?string
/**
* {@inheritdoc}
*/
public function withBaggageItem(string $key, string $value): ?SpanContext
public function withBaggageItem(string $key, string $value): SpanContext
{
return new self();
}
Expand Down
2 changes: 1 addition & 1 deletion src/OpenTracing/SpanContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ public function getBaggageItem(string $key): ?string;
* @param string $value
* @return SpanContext
*/
public function withBaggageItem(string $key, string $value): ?SpanContext;
public function withBaggageItem(string $key, string $value): SpanContext;
}

0 comments on commit 450cfd9

Please sign in to comment.