removing useless getLastInsertId()

alpha1
Maxence Lange 2018-12-08 19:53:52 -01:00
rodzic b534b11664
commit e644ec335c
2 zmienionych plików z 2 dodań i 10 usunięć

Wyświetl plik

@ -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();
}

Wyświetl plik

@ -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();
}