aboutsummaryrefslogtreecommitdiffstats
path: root/apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php')
-rw-r--r--apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php33
1 files changed, 8 insertions, 25 deletions
diff --git a/apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php b/apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php
index 84972a5171a..fbbc3d0403c 100644
--- a/apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php
+++ b/apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php
@@ -1,28 +1,11 @@
<?php
+
+declare(strict_types=1);
+
/**
- *
- *
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Joas Schilling <coding@schilljs.com>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
-
namespace OCA\TwoFactorBackupCodes\Db;
use OCP\AppFramework\Db\QBMapper;
@@ -42,7 +25,7 @@ class BackupCodeMapper extends QBMapper {
* @param IUser $user
* @return BackupCode[]
*/
- public function getBackupCodes(IUser $user) {
+ public function getBackupCodes(IUser $user): array {
/* @var IQueryBuilder $qb */
$qb = $this->db->getQueryBuilder();
@@ -56,14 +39,14 @@ class BackupCodeMapper extends QBMapper {
/**
* @param IUser $user
*/
- public function deleteCodes(IUser $user) {
+ public function deleteCodes(IUser $user): void {
$this->deleteCodesByUserId($user->getUID());
}
/**
* @param string $uid
*/
- public function deleteCodesByUserId($uid) {
+ public function deleteCodesByUserId(string $uid): void {
/* @var IQueryBuilder $qb */
$qb = $this->db->getQueryBuilder();