summaryrefslogtreecommitdiffstats
path: root/apps/twofactor_backupcodes/lib
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 14:19:56 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 14:19:56 +0200
commitcaff1023ea72bb2ea94130e18a2a6e2ccf819e5f (patch)
tree186d494c2aea5dea7255d3584ef5d595fc6e6194 /apps/twofactor_backupcodes/lib
parentedf8ce32cffdb920e8171207b342abbd7f1fbe73 (diff)
downloadnextcloud-server-caff1023ea72bb2ea94130e18a2a6e2ccf819e5f.tar.gz
nextcloud-server-caff1023ea72bb2ea94130e18a2a6e2ccf819e5f.zip
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/twofactor_backupcodes/lib')
-rw-r--r--apps/twofactor_backupcodes/lib/Activity/Provider.php1
-rw-r--r--apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php1
-rw-r--r--apps/twofactor_backupcodes/lib/Controller/SettingsController.php1
-rw-r--r--apps/twofactor_backupcodes/lib/Db/BackupCode.php1
-rw-r--r--apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php2
-rw-r--r--apps/twofactor_backupcodes/lib/Event/CodesGenerated.php1
-rw-r--r--apps/twofactor_backupcodes/lib/Listener/ActivityPublisher.php1
-rw-r--r--apps/twofactor_backupcodes/lib/Listener/ProviderDisabled.php1
-rw-r--r--apps/twofactor_backupcodes/lib/Listener/ProviderEnabled.php1
-rw-r--r--apps/twofactor_backupcodes/lib/Listener/RegistryUpdater.php1
-rw-r--r--apps/twofactor_backupcodes/lib/Migration/CheckBackupCodes.php1
-rw-r--r--apps/twofactor_backupcodes/lib/Migration/Version1002Date20170926101419.php1
-rw-r--r--apps/twofactor_backupcodes/lib/Migration/Version1002Date20180821043638.php1
-rw-r--r--apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php1
-rw-r--r--apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php2
-rw-r--r--apps/twofactor_backupcodes/lib/Settings/Personal.php1
16 files changed, 0 insertions, 18 deletions
diff --git a/apps/twofactor_backupcodes/lib/Activity/Provider.php b/apps/twofactor_backupcodes/lib/Activity/Provider.php
index ac62ebabd05..12c71f68d1c 100644
--- a/apps/twofactor_backupcodes/lib/Activity/Provider.php
+++ b/apps/twofactor_backupcodes/lib/Activity/Provider.php
@@ -75,5 +75,4 @@ class Provider implements IProvider {
}
return $event;
}
-
}
diff --git a/apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php b/apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php
index 61dbffb3214..5d6d428cecc 100644
--- a/apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php
+++ b/apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php
@@ -66,5 +66,4 @@ class CheckBackupCodes extends QueuedJob {
}
});
}
-
}
diff --git a/apps/twofactor_backupcodes/lib/Controller/SettingsController.php b/apps/twofactor_backupcodes/lib/Controller/SettingsController.php
index 2d87af3183f..04ec2e19e95 100644
--- a/apps/twofactor_backupcodes/lib/Controller/SettingsController.php
+++ b/apps/twofactor_backupcodes/lib/Controller/SettingsController.php
@@ -64,5 +64,4 @@ class SettingsController extends Controller {
'state' => $this->storage->getBackupCodesState($user),
]);
}
-
}
diff --git a/apps/twofactor_backupcodes/lib/Db/BackupCode.php b/apps/twofactor_backupcodes/lib/Db/BackupCode.php
index bbd40bf3643..02d1932d50b 100644
--- a/apps/twofactor_backupcodes/lib/Db/BackupCode.php
+++ b/apps/twofactor_backupcodes/lib/Db/BackupCode.php
@@ -44,5 +44,4 @@ class BackupCode extends Entity {
/** @var int */
protected $used;
-
}
diff --git a/apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php b/apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php
index 73883b3eb30..48c3fd6a84d 100644
--- a/apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php
+++ b/apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php
@@ -31,7 +31,6 @@ use OCP\IDBConnection;
use OCP\IUser;
class BackupCodeMapper extends QBMapper {
-
public function __construct(IDBConnection $db) {
parent::__construct($db, 'twofactor_backupcodes');
}
@@ -69,5 +68,4 @@ class BackupCodeMapper extends QBMapper {
->where($qb->expr()->eq('user_id', $qb->createNamedParameter($uid)));
$qb->execute();
}
-
}
diff --git a/apps/twofactor_backupcodes/lib/Event/CodesGenerated.php b/apps/twofactor_backupcodes/lib/Event/CodesGenerated.php
index 7db29bdf765..d1e5e29d4b5 100644
--- a/apps/twofactor_backupcodes/lib/Event/CodesGenerated.php
+++ b/apps/twofactor_backupcodes/lib/Event/CodesGenerated.php
@@ -45,5 +45,4 @@ class CodesGenerated extends Event {
public function getUser(): IUser {
return $this->user;
}
-
}
diff --git a/apps/twofactor_backupcodes/lib/Listener/ActivityPublisher.php b/apps/twofactor_backupcodes/lib/Listener/ActivityPublisher.php
index 99dd39b5b1d..d7240677b6c 100644
--- a/apps/twofactor_backupcodes/lib/Listener/ActivityPublisher.php
+++ b/apps/twofactor_backupcodes/lib/Listener/ActivityPublisher.php
@@ -66,5 +66,4 @@ class ActivityPublisher implements IEventListener {
}
}
}
-
}
diff --git a/apps/twofactor_backupcodes/lib/Listener/ProviderDisabled.php b/apps/twofactor_backupcodes/lib/Listener/ProviderDisabled.php
index 9dfecee0df7..f3242aa8c8a 100644
--- a/apps/twofactor_backupcodes/lib/Listener/ProviderDisabled.php
+++ b/apps/twofactor_backupcodes/lib/Listener/ProviderDisabled.php
@@ -64,5 +64,4 @@ class ProviderDisabled implements IEventListener {
$this->jobList->remove(RememberBackupCodesJob::class, ['uid' => $event->getUser()->getUID()]);
}
}
-
}
diff --git a/apps/twofactor_backupcodes/lib/Listener/ProviderEnabled.php b/apps/twofactor_backupcodes/lib/Listener/ProviderEnabled.php
index de3d52ef436..d43af2e4590 100644
--- a/apps/twofactor_backupcodes/lib/Listener/ProviderEnabled.php
+++ b/apps/twofactor_backupcodes/lib/Listener/ProviderEnabled.php
@@ -61,5 +61,4 @@ class ProviderEnabled implements IEventListener {
$this->jobList->add(RememberBackupCodesJob::class, ['uid' => $event->getUser()->getUID()]);
}
-
}
diff --git a/apps/twofactor_backupcodes/lib/Listener/RegistryUpdater.php b/apps/twofactor_backupcodes/lib/Listener/RegistryUpdater.php
index 48e231facb3..011950a0979 100644
--- a/apps/twofactor_backupcodes/lib/Listener/RegistryUpdater.php
+++ b/apps/twofactor_backupcodes/lib/Listener/RegistryUpdater.php
@@ -50,5 +50,4 @@ class RegistryUpdater implements IEventListener {
$this->registry->enableProviderFor($this->provider, $event->getUser());
}
}
-
}
diff --git a/apps/twofactor_backupcodes/lib/Migration/CheckBackupCodes.php b/apps/twofactor_backupcodes/lib/Migration/CheckBackupCodes.php
index d5b3758f37f..e43a99b9e0a 100644
--- a/apps/twofactor_backupcodes/lib/Migration/CheckBackupCodes.php
+++ b/apps/twofactor_backupcodes/lib/Migration/CheckBackupCodes.php
@@ -46,5 +46,4 @@ class CheckBackupCodes implements IRepairStep {
public function run(IOutput $output) {
$this->jobList->add(\OCA\TwoFactorBackupCodes\BackgroundJob\CheckBackupCodes::class);
}
-
}
diff --git a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170926101419.php b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170926101419.php
index cd922454ea0..f8df9e69844 100644
--- a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170926101419.php
+++ b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170926101419.php
@@ -40,5 +40,4 @@ class Version1002Date20170926101419 extends BigIntMigration {
'twofactor_backupcodes' => ['id'],
];
}
-
}
diff --git a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20180821043638.php b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20180821043638.php
index 3cbadb455a6..1138bcd6bd2 100644
--- a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20180821043638.php
+++ b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20180821043638.php
@@ -50,5 +50,4 @@ class Version1002Date20180821043638 extends SimpleMigrationStep {
return $schema;
}
-
}
diff --git a/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php b/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php
index 6d60f589e52..9b7ce1ed7de 100644
--- a/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php
+++ b/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php
@@ -165,5 +165,4 @@ class BackupCodesProvider implements IProvider, IProvidesPersonalSettings {
$this->initialStateService->provideInitialState($this->appName, 'state', $state);
return new Personal();
}
-
}
diff --git a/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php b/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php
index ffb456792a4..fb604d80aab 100644
--- a/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php
+++ b/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php
@@ -34,7 +34,6 @@ use OCP\Security\IHasher;
use OCP\Security\ISecureRandom;
class BackupCodeStorage {
-
private static $CODE_LENGTH = 16;
/** @var BackupCodeMapper */
@@ -133,5 +132,4 @@ class BackupCodeStorage {
}
return false;
}
-
}
diff --git a/apps/twofactor_backupcodes/lib/Settings/Personal.php b/apps/twofactor_backupcodes/lib/Settings/Personal.php
index e7cfcb77ca6..062016d0d05 100644
--- a/apps/twofactor_backupcodes/lib/Settings/Personal.php
+++ b/apps/twofactor_backupcodes/lib/Settings/Personal.php
@@ -35,5 +35,4 @@ class Personal implements IPersonalProviderSettings {
public function getBody(): Template {
return new Template('twofactor_backupcodes', 'personal');
}
-
}