original_string: public function getLastInsertId(string $name = null)
      {
          if (null === $this->pdo) {
              throw new DatabaseException('Not connected: can not retrieve last insert id');
          }
  
          try {
              return $this->pdo->lastInsertId($name);
          } catch (PDOException $pdoe) {
              throw new DatabaseException($pdoe->getMessage(), $pdoe);
          }
      }
code: public function getLastInsertId(string $name = null)
      {
          if (null === $this->pdo) {
              throw new DatabaseException('Not connected: can not retrieve last insert id');
          }
  
          try {
              return $this->pdo->lastInsertId($name);
          } catch (PDOException $pdoe) {
              throw new DatabaseException($pdoe->getMessage(), $pdoe);
          }
      }
code_tokens: public function getLastInsertId ( string $ name = null ) { if ( null === $ this -> pdo ) { throw new DatabaseException ( 'Not connected: can not retrieve last insert id' ) ; } try { return $ this -> pdo -> lastInsertId ( $ name ) ; } catch ( PDOException $ pdoe ) { throw new DatabaseException ( $ pdoe -> getMessage ( ) , $ pdoe ) ; } }
docstring: returns the last insert id
  
  @param   string  $name  name of the sequence object from which the ID should be returned.
  @return  int
  @throws  \stubbles\db\DatabaseException
docstring_tokens: returns the last insert id