Commaaa2
This commit is contained in:
@@ -27,19 +27,11 @@ abstract class AbstractProviderFactory implements ProviderFactoryInterface
|
||||
|
||||
protected function getUser(Dsn $dsn): string
|
||||
{
|
||||
if (null === $user = $dsn->getUser()) {
|
||||
throw new IncompleteDsnException('User is not set.', $dsn->getOriginalDsn());
|
||||
}
|
||||
|
||||
return $user;
|
||||
return $dsn->getUser() ?? throw new IncompleteDsnException('User is not set.', $dsn->getScheme().'://'.$dsn->getHost());
|
||||
}
|
||||
|
||||
protected function getPassword(Dsn $dsn): string
|
||||
{
|
||||
if (null === $password = $dsn->getPassword()) {
|
||||
throw new IncompleteDsnException('Password is not set.', $dsn->getOriginalDsn());
|
||||
}
|
||||
|
||||
return $password;
|
||||
return $dsn->getPassword() ?? throw new IncompleteDsnException('Password is not set.', $dsn->getOriginalDsn());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user