From e644ec335c928648f0205cdbf450073d804d9483 Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Sat, 8 Dec 2018 19:53:52 -0100 Subject: [PATCH] removing useless getLastInsertId() --- lib/Db/CacheActorsRequest.php | 6 +----- lib/Db/NotesRequest.php | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/Db/CacheActorsRequest.php b/lib/Db/CacheActorsRequest.php index 7a3f0ff2..5d703098 100644 --- a/lib/Db/CacheActorsRequest.php +++ b/lib/Db/CacheActorsRequest.php @@ -62,10 +62,8 @@ class CacheActorsRequest extends CacheActorsRequestBuilder { * insert cache about an Actor in database. * * @param Person $actor - * - * @return int */ - public function save(Person $actor): int { + public function save(Person $actor) { $qb = $this->getCacheActorsInsertSql(); $qb->setValue('id', $qb->createNamedParameter($actor->getId())) ->setValue('account', $qb->createNamedParameter($actor->getAccount())) @@ -101,8 +99,6 @@ class CacheActorsRequest extends CacheActorsRequestBuilder { $qb->setValue('icon_id', $qb->createNamedParameter($iconId)); $qb->execute(); - - return $qb->getLastInsertId(); } diff --git a/lib/Db/NotesRequest.php b/lib/Db/NotesRequest.php index 9e687e25..891c7f91 100644 --- a/lib/Db/NotesRequest.php +++ b/lib/Db/NotesRequest.php @@ -61,10 +61,8 @@ class NotesRequest extends NotesRequestBuilder { * Insert a new Note in the database. * * @param Note $note - * - * @return int */ - public function save(Note $note): int { + public function save(Note $note) { $dTime = new DateTime(); $dTime->setTimestamp($note->getPublishedTime()); @@ -108,8 +106,6 @@ class NotesRequest extends NotesRequestBuilder { ); $qb->execute(); - - return $qb->getLastInsertId(); }