Skip to content

Commit

Permalink
Suppress Psalm bug
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Dec 7, 2023
1 parent f6a7731 commit 42a5e1f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/PostgresConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ final class PostgresConfig extends SqlConfig
'verify-full',
];

/** @var array<non-empty-string, non-empty-string> Psalm has a bug with the spread operator. */
public const KEY_MAP = [
...parent::KEY_MAP,
'ssl_mode' => 'sslmode',
Expand All @@ -28,6 +29,7 @@ final class PostgresConfig extends SqlConfig

public static function fromString(string $connectionString): self
{
/** @psalm-suppress InvalidArgument Psalm does not recognize {@see self::KEY_MAP} is in fact a map. */
$parts = self::parseConnectionString($connectionString, self::KEY_MAP);

if (!isset($parts["host"])) {
Expand Down

0 comments on commit 42a5e1f

Please sign in to comment.