private function connect(Credentials $credentials) : PDO
    {
        if ($this->pdo === null) {
            $this->pdo = new PDO($credentials->getDSN(), $credentials->getUsername(), $credentials->getPassword());
        }

        return $this->pdo;
    }