From c9981aecd30f7ed30e6a9f045b2046a2a4901823 Mon Sep 17 00:00:00 2001 From: Mateus Junges Date: Tue, 24 Oct 2023 10:37:09 -0300 Subject: [PATCH] Fix type error --- src/Console/Commands/KafkaConsumer/Options.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Console/Commands/KafkaConsumer/Options.php b/src/Console/Commands/KafkaConsumer/Options.php index 0e4d0041..c3a2c413 100644 --- a/src/Console/Commands/KafkaConsumer/Options.php +++ b/src/Console/Commands/KafkaConsumer/Options.php @@ -18,7 +18,6 @@ final class Options private readonly ?string $saslUsername; private readonly ?string $saslPassword; private readonly ?string $saslMechanisms; - private array $config; #[Pure] public function __construct(array $options, private readonly array $config) @@ -29,7 +28,6 @@ public function __construct(array $options, private readonly array $config) $this->{$option} = $value; } - $this->config = $config; $this->saslPassword = $config['sasl']['password']; $this->saslUsername = $config['sasl']['username']; $this->saslMechanisms = $config['sasl']['mechanisms']; @@ -87,7 +85,7 @@ public function getSasl(): ?Sasl public function getSecurityProtocol(): ?string { - $securityProtocol = strlen($this->securityProtocol) > 1 + $securityProtocol = strlen($this->securityProtocol ?? '') > 1 ? $this->securityProtocol : $this->config['securityProtocol'];