Skip to content

Commit

Permalink
Fixed implicitly nullable params (#6616)
Browse files Browse the repository at this point in the history
  • Loading branch information
huangdijia authored Mar 23, 2024
1 parent fe780d1 commit 974b51c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion class_map/ThriftUdpTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class ThriftUdpTransport extends TTransport
*/
private $chan;

public function __construct(string $host, int $port, LoggerInterface $logger = null)
public function __construct(string $host, int $port, ?LoggerInterface $logger = null)
{
$this->host = $host;
$this->port = $port;
Expand Down
4 changes: 2 additions & 2 deletions src/Adapter/Reporter/Kafka.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class Kafka implements Reporter
public function __construct(
private array $options,
private KafkaClientFactory $clientFactory,
LoggerInterface $logger = null,
SpanSerializer $serializer = null
?LoggerInterface $logger = null,
?SpanSerializer $serializer = null
) {
$this->serializer = $serializer ?? new JsonV2Serializer();
$this->logger = $logger ?? new NullLogger();
Expand Down

0 comments on commit 974b51c

Please sign in to comment.