Skip to content

Commit

Permalink
Improve
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Oct 12, 2024
1 parent 72883f7 commit ea5cabe
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Dsn.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
final class Dsn extends AbstractDsn
{
/**
* @param string[] $options
* @psalm-param array<string,string> $options
*/
public function __construct(
string $driver = 'sqlsrv',
string $host = 'localhost',
string|null $databaseName = null,
string $port = '1433',
string|null $port = '1433',
array $options = []
) {
parent::__construct($driver, $host, $databaseName, $port, $options);
Expand Down Expand Up @@ -60,7 +60,9 @@ public function asString(): string
}

if (!empty($options)) {
$dsn .= ';' . http_build_query($options, '', ';');
foreach ($options as $key => $value) {

Check failure on line 63 in src/Dsn.php

View workflow job for this annotation

GitHub Actions / PHP 8.1

MixedAssignment

src/Dsn.php:63:42: MixedAssignment: Unable to determine the type that $value is being assigned to (see https://psalm.dev/032)

Check failure on line 63 in src/Dsn.php

View workflow job for this annotation

GitHub Actions / PHP 8.2

MixedAssignment

src/Dsn.php:63:42: MixedAssignment: Unable to determine the type that $value is being assigned to (see https://psalm.dev/032)

Check failure on line 63 in src/Dsn.php

View workflow job for this annotation

GitHub Actions / PHP 8.3

MixedAssignment

src/Dsn.php:63:42: MixedAssignment: Unable to determine the type that $value is being assigned to (see https://psalm.dev/032)
$dsn .= ";$key=$value";
}
}

return $dsn;
Expand Down

0 comments on commit ea5cabe

Please sign in to comment.