From 7bd8b27b62dcf21a96beede549ee73303165e20e Mon Sep 17 00:00:00 2001 From: Fabien Salathe Date: Tue, 20 Jul 2021 17:26:59 +0200 Subject: [PATCH 1/2] Fix phpdoc handle_factory array - Array key should be `handle_factory`, not `factory` - Added @param array information --- src/Handler/CurlHandler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Handler/CurlHandler.php b/src/Handler/CurlHandler.php index 47e21f0e3..cb9cb0b58 100644 --- a/src/Handler/CurlHandler.php +++ b/src/Handler/CurlHandler.php @@ -24,9 +24,9 @@ class CurlHandler /** * Accepts an associative array of options: * - * - factory: Optional curl factory used to create cURL handles. + * - handle_factory: Optional curl factory used to create cURL handles. * - * @param array $options Array of options to use with the handler + * @param array{handle_factory?:CurlFactoryInterface} $options Array of options to use with the handler */ public function __construct(array $options = []) { From 5ab88e870c1b714f7caba335bdc4d9b15f001a3f Mon Sep 17 00:00:00 2001 From: Fabien Salathe Date: Wed, 21 Jul 2021 00:00:25 +0200 Subject: [PATCH 2/2] Make handle_factory key nullable --- src/Handler/CurlHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Handler/CurlHandler.php b/src/Handler/CurlHandler.php index cb9cb0b58..9ad10a9b0 100644 --- a/src/Handler/CurlHandler.php +++ b/src/Handler/CurlHandler.php @@ -26,7 +26,7 @@ class CurlHandler * * - handle_factory: Optional curl factory used to create cURL handles. * - * @param array{handle_factory?:CurlFactoryInterface} $options Array of options to use with the handler + * @param array{handle_factory?: ?CurlFactoryInterface} $options Array of options to use with the handler */ public function __construct(array $options = []) {