Merge pull request #25997 from nextcloud/techdept/psalm/redundantcast
Fix some redundant casts
This commit is contained in:
commit
43b333331d
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue