diff options
Diffstat (limited to 'lib/private/DB/QueryBuilder')
-rw-r--r-- | lib/private/DB/QueryBuilder/QueryBuilder.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/DB/QueryBuilder/QueryBuilder.php b/lib/private/DB/QueryBuilder/QueryBuilder.php index aa0327e89d9..35b7240abfe 100644 --- a/lib/private/DB/QueryBuilder/QueryBuilder.php +++ b/lib/private/DB/QueryBuilder/QueryBuilder.php @@ -1234,11 +1234,11 @@ class QueryBuilder implements IQueryBuilder { * @return int * @throws \BadMethodCallException When being called before an insert query has been run. */ - public function getLastInsertId() { + public function getLastInsertId(): int { if ($this->getType() === \Doctrine\DBAL\Query\QueryBuilder::INSERT && $this->lastInsertedTable) { // lastInsertId() needs the prefix but no quotes $table = $this->prefixTableName($this->lastInsertedTable); - return (int) $this->connection->lastInsertId($table); + return $this->connection->lastInsertId($table); } throw new \BadMethodCallException('Invalid call to getLastInsertId without using insert() before.'); |