diff --git a/JaegerBaggagePropagator.php b/JaegerBaggagePropagator.php index a7a2b6c..dd53b22 100644 --- a/JaegerBaggagePropagator.php +++ b/JaegerBaggagePropagator.php @@ -39,7 +39,7 @@ public function fields(): array } /** {@inheritdoc} */ - public function inject(&$carrier, PropagationSetterInterface $setter = null, ContextInterface $context = null): void + public function inject(&$carrier, ?PropagationSetterInterface $setter = null, ?ContextInterface $context = null): void { $setter ??= ArrayAccessGetterSetter::getInstance(); $context ??= Context::getCurrent(); @@ -59,7 +59,7 @@ public function inject(&$carrier, PropagationSetterInterface $setter = null, Con } /** {@inheritdoc} */ - public function extract($carrier, PropagationGetterInterface $getter = null, ContextInterface $context = null): ContextInterface + public function extract($carrier, ?PropagationGetterInterface $getter = null, ?ContextInterface $context = null): ContextInterface { $getter ??= ArrayAccessGetterSetter::getInstance(); $context ??= Context::getCurrent(); diff --git a/JaegerPropagator.php b/JaegerPropagator.php index 3064c57..31cdcd5 100644 --- a/JaegerPropagator.php +++ b/JaegerPropagator.php @@ -51,7 +51,7 @@ public function fields(): array } /** {@inheritdoc} */ - public function inject(&$carrier, PropagationSetterInterface $setter = null, ContextInterface $context = null): void + public function inject(&$carrier, ?PropagationSetterInterface $setter = null, ?ContextInterface $context = null): void { $setter ??= ArrayAccessGetterSetter::getInstance(); $context ??= Context::getCurrent(); @@ -75,7 +75,7 @@ public function inject(&$carrier, PropagationSetterInterface $setter = null, Con } /** {@inheritdoc} */ - public function extract($carrier, PropagationGetterInterface $getter = null, ContextInterface $context = null): ContextInterface + public function extract($carrier, ?PropagationGetterInterface $getter = null, ?ContextInterface $context = null): ContextInterface { $getter ??= ArrayAccessGetterSetter::getInstance(); $context ??= Context::getCurrent();