Skip to content

Commit

Permalink
Update DSN.php
Browse files Browse the repository at this point in the history
  • Loading branch information
eldadfux authored Nov 2, 2023
1 parent 574eeec commit b27de85
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/DSN/DSN.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,9 @@ public function __construct(string $dsn)
$this->scheme = $parts['scheme'] ?? null;
$this->user = isset($parts['user']) ? \urldecode($parts['user']) : null;
$this->password = isset($parts['pass']) ? \urldecode($parts['pass']) : null;
$this->host = $parts['host'] ?? null;
$this->user = $parts['user'] ?? null;
$this->password = $parts['pass'] ?? null;
$this->host = $parts['host'] ?? '';
$this->port = $parts['port'] ?? null;
$this->path = isset($parts['path']) ? ltrim($parts['path'], '/') : null;
$this->path = $parts['path'] ?? '';
$this->path = isset($parts['path']) ? ltrim($parts['path'], '/') : '';
$this->query = $parts['query'] ?? null;
}

Expand Down Expand Up @@ -133,7 +129,7 @@ public function getPath(): ?string
}

/**
* Return the query string
* Return the raw query string
*
* @return ?string
*/
Expand Down

0 comments on commit b27de85

Please sign in to comment.