diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-01-03 15:28:31 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-01-08 11:45:19 +0100 |
commit | 8b64e92b9262d2a2eec6345685ce421050f95c66 (patch) | |
tree | dd51490b8a184b2643414d11867a9fa450aa5065 /lib/private/Repair/RemoveLinkShares.php | |
parent | 84e6e9f7cf19207041925eaa237d24e1c12c2c2d (diff) | |
download | nextcloud-server-8b64e92b9262d2a2eec6345685ce421050f95c66.tar.gz nextcloud-server-8b64e92b9262d2a2eec6345685ce421050f95c66.zip |
Bump doctrine/dbal from 2.12.0 to 3.0.0
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Repair/RemoveLinkShares.php')
-rw-r--r-- | lib/private/Repair/RemoveLinkShares.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/private/Repair/RemoveLinkShares.php b/lib/private/Repair/RemoveLinkShares.php index 3a0dd6f2884..32cbd1f73f8 100644 --- a/lib/private/Repair/RemoveLinkShares.php +++ b/lib/private/Repair/RemoveLinkShares.php @@ -30,8 +30,8 @@ declare(strict_types=1); namespace OC\Repair; -use Doctrine\DBAL\Driver\Statement; use OCP\AppFramework\Utility\ITimeFactory; +use OCP\DB\IResult; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IConfig; use OCP\IDBConnection; @@ -138,10 +138,8 @@ class RemoveLinkShares implements IRepairStep { /** * Get the cursor to fetch all the shares - * - * @return \Doctrine\DBAL\Driver\Statement */ - private function getShares(): Statement { + private function getShares(): IResult { $subQuery = $this->connection->getQueryBuilder(); $subQuery->select('*') ->from('share') @@ -160,7 +158,9 @@ class RemoveLinkShares implements IRepairStep { $query->expr()->eq('s2.share_type', $query->expr()->literal(2, IQueryBuilder::PARAM_INT)) )) ->andWhere($query->expr()->eq('s1.item_source', 's2.item_source')); - return $query->execute(); + /** @var IResult $result */ + $result = $query->execute(); + return $result; } /** @@ -210,13 +210,13 @@ class RemoveLinkShares implements IRepairStep { private function repair(IOutput $output, int $total): void { $output->startProgress($total); - $shareCursor = $this->getShares(); - while ($data = $shareCursor->fetch()) { + $shareResult = $this->getShares(); + while ($data = $shareResult->fetch()) { $this->processShare($data); $output->advance(); } $output->finishProgress(); - $shareCursor->closeCursor(); + $shareResult->closeCursor(); // Notifiy all admins $adminGroup = $this->groupManager->get('admin'); |