public function createPDOConnection(): PDO
    {
        $user = $this->getUser();
        $password = $this->getPassword();
        $parameters = $this->getParametersForPDO();
        $dsn = $this->getDsn();

        try {
            if ($this->getEngine() !== 'sqlite') {
                return new PDO($dsn, $user, $password, $parameters);
            }

            return new PDO($dsn, null, null, $parameters);
        } catch (PDOException $e) {
            throw new DatabaseException($e->getMessage());
        }
    }
public function createPDOConnection(): PDO
    {
        $user = $this->getUser();
        $password = $this->getPassword();
        $parameters = $this->getParametersForPDO();
        $dsn = $this->getDsn();

        try {
            if ($this->getEngine() !== 'sqlite') {
                return new PDO($dsn, $user, $password, $parameters);
            }

            return new PDO($dsn, null, null, $parameters);
        } catch (PDOException $e) {
            throw new DatabaseException($e->getMessage());
        }
    }
@throws DatabaseException

@return PDO