Skip to content

Commit

Permalink
Fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusjunges committed Oct 24, 2023
1 parent d8eed8d commit c9981ae
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Console/Commands/KafkaConsumer/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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'];
Expand Down Expand Up @@ -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'];

Expand Down

0 comments on commit c9981ae

Please sign in to comment.