Merge pull request #25997 from nextcloud/techdept/psalm/redundantcast

Fix some redundant casts
This commit is contained in:
Lukas Reschke 2021-03-08 14:28:11 +01:00 committed by GitHub
commit 43b333331d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 7 deletions

View File

@ -393,9 +393,7 @@ class FederatedShareProvider implements IShareProvider {
$qb->setValue('file_target', $qb->createNamedParameter(''));
$qb->execute();
$id = $qb->getLastInsertId();
return (int)$id;
return $qb->getLastInsertId();
}
/**

View File

@ -690,9 +690,7 @@ class ShareByMailProvider implements IShareProvider {
$qb->setValue('file_target', $qb->createNamedParameter(''));
$qb->execute();
$id = $qb->getLastInsertId();
return (int)$id;
return $qb->getLastInsertId();
}
/**

View File

@ -136,7 +136,7 @@ abstract class QBMapper {
if ($entity->id === null) {
// When autoincrement is used id is always an int
$entity->setId((int)$qb->getLastInsertId());
$entity->setId($qb->getLastInsertId());
}
return $entity;