From 1d0ef27f1b19b9a0175a0e130d1df3113e5a130e Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 19 Mar 2024 11:13:26 +0100 Subject: [PATCH] Make more nullable types explicit --- Transport.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Transport.php b/Transport.php index ab7b67e..294442e 100644 --- a/Transport.php +++ b/Transport.php @@ -63,7 +63,7 @@ class Transport * @param HttpClientInterface|null $client * @param LoggerInterface|null $logger */ - public static function fromDsn(string $dsn/* , EventDispatcherInterface $dispatcher = null, HttpClientInterface $client = null, LoggerInterface $logger = null */): TransportInterface + public static function fromDsn(string $dsn/* , ?EventDispatcherInterface $dispatcher = null, ?HttpClientInterface $client = null, ?LoggerInterface $logger = null */): TransportInterface { $dispatcher = 2 <= \func_num_args() ? func_get_arg(1) : null; $client = 3 <= \func_num_args() ? func_get_arg(2) : null; @@ -79,7 +79,7 @@ public static function fromDsn(string $dsn/* , EventDispatcherInterface $dispatc * @param HttpClientInterface|null $client * @param LoggerInterface|null $logger */ - public static function fromDsns(array $dsns/* , EventDispatcherInterface $dispatcher = null, HttpClientInterface $client = null, LoggerInterface $logger = null */): TransportInterface + public static function fromDsns(array $dsns/* , ?EventDispatcherInterface $dispatcher = null, ?HttpClientInterface $client = null, ?LoggerInterface $logger = null */): TransportInterface { $dispatcher = 2 <= \func_num_args() ? func_get_arg(1) : null; $client = 3 <= \func_num_args() ? func_get_arg(2) : null; @@ -183,7 +183,7 @@ public function fromDsnObject(Dsn $dsn): TransportInterface * * @return \Traversable */ - public static function getDefaultFactories(/* EventDispatcherInterface $dispatcher = null, HttpClientInterface $client = null, LoggerInterface $logger = null */): iterable + public static function getDefaultFactories(/* ?EventDispatcherInterface $dispatcher = null, ?HttpClientInterface $client = null, ?LoggerInterface $logger = null */): iterable { $dispatcher = 1 <= \func_num_args() ? func_get_arg(0) : null; $client = 2 <= \func_num_args() ? func_get_arg(1) : null;