aboutsummaryrefslogtreecommitdiffstats
path: root/apps/oauth2
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2021-03-11 14:33:15 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2021-03-11 14:33:15 +0100
commitc2f7c417b208399fbbbe8a756543f0c150a55679 (patch)
treebd0d9d71df5003213375b3d14b94f26e95a6d5d2 /apps/oauth2
parentd090f970dddb7e0be2aaa0ce981a903b08c8838b (diff)
downloadnextcloud-server-c2f7c417b208399fbbbe8a756543f0c150a55679.tar.gz
nextcloud-server-c2f7c417b208399fbbbe8a756543f0c150a55679.zip
Add psalm annotation to the DB handlers of OAuth2
* Psalm annotations * To new executeUpdate Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/oauth2')
-rw-r--r--apps/oauth2/lib/Db/AccessTokenMapper.php5
-rw-r--r--apps/oauth2/lib/Db/ClientMapper.php3
2 files changed, 7 insertions, 1 deletions
diff --git a/apps/oauth2/lib/Db/AccessTokenMapper.php b/apps/oauth2/lib/Db/AccessTokenMapper.php
index a748159a754..79c1ecefd95 100644
--- a/apps/oauth2/lib/Db/AccessTokenMapper.php
+++ b/apps/oauth2/lib/Db/AccessTokenMapper.php
@@ -34,6 +34,9 @@ use OCP\AppFramework\Db\QBMapper;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;
+/**
+ * @template-extends QBMapper<AccessToken>
+ */
class AccessTokenMapper extends QBMapper {
/**
@@ -74,6 +77,6 @@ class AccessTokenMapper extends QBMapper {
$qb
->delete($this->tableName)
->where($qb->expr()->eq('client_id', $qb->createNamedParameter($id, IQueryBuilder::PARAM_INT)));
- $qb->execute();
+ $qb->executeUpdate();
}
}
diff --git a/apps/oauth2/lib/Db/ClientMapper.php b/apps/oauth2/lib/Db/ClientMapper.php
index 85c99e80a5e..787d926d0a9 100644
--- a/apps/oauth2/lib/Db/ClientMapper.php
+++ b/apps/oauth2/lib/Db/ClientMapper.php
@@ -34,6 +34,9 @@ use OCP\AppFramework\Db\QBMapper;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;
+/**
+ * @template-extends QBMapper<Client>
+ */
class ClientMapper extends QBMapper {
/**