diff --git a/src/Instrumentation/ExtRdKafka/tests/Integration/ExtRdKafkaInstrumentationTest.php b/src/Instrumentation/ExtRdKafka/tests/Integration/ExtRdKafkaInstrumentationTest.php index 55e0bac25..05fd2359b 100644 --- a/src/Instrumentation/ExtRdKafka/tests/Integration/ExtRdKafkaInstrumentationTest.php +++ b/src/Instrumentation/ExtRdKafka/tests/Integration/ExtRdKafkaInstrumentationTest.php @@ -136,7 +136,7 @@ public function test_produce_creates_new_span() private function produceMessage( string $message, ?string $key = null, - array $headers = null, + ?array $headers = null, bool $produceWithoutHeaders = false ): void { $conf = new Conf(); @@ -163,7 +163,7 @@ private function consumeMessage(): int|Message { $conf = new Conf(); - $conf->setRebalanceCb(function (KafkaConsumer $kafka, $err, array $partitions = null) { + $conf->setRebalanceCb(function (KafkaConsumer $kafka, $err, ?array $partitions = null) { switch ($err) { case RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS: $kafka->assign($partitions); diff --git a/src/Instrumentation/HttpAsyncClient/tests/Integration/HttpAsyncClientInstrumentationTest.php b/src/Instrumentation/HttpAsyncClient/tests/Integration/HttpAsyncClientInstrumentationTest.php index ffe7044ab..9dca090e8 100644 --- a/src/Instrumentation/HttpAsyncClient/tests/Integration/HttpAsyncClientInstrumentationTest.php +++ b/src/Instrumentation/HttpAsyncClient/tests/Integration/HttpAsyncClientInstrumentationTest.php @@ -94,7 +94,7 @@ public function __construct($response) $this->response = $response; } - public function then(callable $onFulfilled = null, callable $onRejected = null): Promise + public function then(?callable $onFulfilled = null, ?callable $onRejected = null): Promise { $this->onFulfilled = $onFulfilled; $this->onRejected = $onRejected; diff --git a/src/Instrumentation/MongoDB/src/MongoDBInstrumentation.php b/src/Instrumentation/MongoDB/src/MongoDBInstrumentation.php index 7400da50e..976479db8 100644 --- a/src/Instrumentation/MongoDB/src/MongoDBInstrumentation.php +++ b/src/Instrumentation/MongoDB/src/MongoDBInstrumentation.php @@ -14,7 +14,7 @@ final class MongoDBInstrumentation /** * @param callable(object):?string $commandSerializer */ - public static function register(callable $commandSerializer = null): void + public static function register(?callable $commandSerializer = null): void { $instrumentation = new CachedInstrumentation( 'io.opentelemetry.contrib.php.mongodb', diff --git a/src/Symfony/tests/Unit/OtelSdkBundle/Factory/GenericFactoryTraitTest.php b/src/Symfony/tests/Unit/OtelSdkBundle/Factory/GenericFactoryTraitTest.php index 725b13731..827c0ac8a 100644 --- a/src/Symfony/tests/Unit/OtelSdkBundle/Factory/GenericFactoryTraitTest.php +++ b/src/Symfony/tests/Unit/OtelSdkBundle/Factory/GenericFactoryTraitTest.php @@ -395,7 +395,7 @@ class TestedDefaultNullClass private $fooBar; private $fooBaz; - public function __construct(string $fooBar, stdClass $fooBaz = null) + public function __construct(string $fooBar, ?stdClass $fooBaz = null) { $this->fooBar = $fooBar; $this->fooBaz = $fooBaz;