diff options
author | Joas Schilling <coding@schilljs.com> | 2023-11-23 10:22:34 +0100 |
---|---|---|
committer | Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com> | 2023-11-23 10:36:13 +0100 |
commit | aa5f037af71c915424c6dcfd5ad2dc82797dc0d6 (patch) | |
tree | 843203cd1346158aab3515687e37a90e78c929e9 /apps/admin_audit | |
parent | 272719ed1cba6836ea0a597bb9767754eeb1e0d4 (diff) | |
download | nextcloud-server-aa5f037af71c915424c6dcfd5ad2dc82797dc0d6.tar.gz nextcloud-server-aa5f037af71c915424c6dcfd5ad2dc82797dc0d6.zip |
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Diffstat (limited to 'apps/admin_audit')
-rw-r--r-- | apps/admin_audit/lib/Actions/Action.php | 9 | ||||
-rw-r--r-- | apps/admin_audit/lib/Actions/UserManagement.php | 2 | ||||
-rw-r--r-- | apps/admin_audit/lib/AppInfo/Application.php | 14 | ||||
-rwxr-xr-x | apps/admin_audit/lib/BackgroundJobs/Rotate.php | 2 |
4 files changed, 14 insertions, 13 deletions
diff --git a/apps/admin_audit/lib/Actions/Action.php b/apps/admin_audit/lib/Actions/Action.php index bfd67f474f9..238ed10e4d9 100644 --- a/apps/admin_audit/lib/Actions/Action.php +++ b/apps/admin_audit/lib/Actions/Action.php @@ -34,7 +34,8 @@ class Action { public function __construct( private IAuditLogger $logger, - ) {} + ) { + } /** * Log a single action with a log level of info @@ -45,9 +46,9 @@ class Action { * @param bool $obfuscateParameters */ public function log(string $text, - array $params, - array $elements, - bool $obfuscateParameters = false): void { + array $params, + array $elements, + bool $obfuscateParameters = false): void { foreach ($elements as $element) { if (!isset($params[$element])) { if ($obfuscateParameters) { diff --git a/apps/admin_audit/lib/Actions/UserManagement.php b/apps/admin_audit/lib/Actions/UserManagement.php index 02d5b60d2fa..c66793d8a5b 100644 --- a/apps/admin_audit/lib/Actions/UserManagement.php +++ b/apps/admin_audit/lib/Actions/UserManagement.php @@ -61,7 +61,7 @@ class UserManagement extends Action { */ public function assign(string $uid): void { $this->log( - 'UserID assigned: "%s"', + 'UserID assigned: "%s"', [ 'uid' => $uid ], [ 'uid' ] ); diff --git a/apps/admin_audit/lib/AppInfo/Application.php b/apps/admin_audit/lib/AppInfo/Application.php index 1daf9f18ef0..d034e79e0c2 100644 --- a/apps/admin_audit/lib/AppInfo/Application.php +++ b/apps/admin_audit/lib/AppInfo/Application.php @@ -101,7 +101,7 @@ class Application extends App implements IBootstrap { * Register hooks in order to log them */ private function registerHooks(IAuditLogger $logger, - ContainerInterface $serverContainer): void { + ContainerInterface $serverContainer): void { $this->userManagementHooks($logger, $serverContainer->get(IUserSession::class)); $this->groupHooks($logger, $serverContainer->get(IGroupManager::class)); $this->authHooks($logger); @@ -122,7 +122,7 @@ class Application extends App implements IBootstrap { } private function userManagementHooks(IAuditLogger $logger, - IUserSession $userSession): void { + IUserSession $userSession): void { $userActions = new UserManagement($logger); Util::connectHook('OC_User', 'post_createUser', $userActions, 'create'); @@ -136,7 +136,7 @@ class Application extends App implements IBootstrap { } private function groupHooks(IAuditLogger $logger, - IGroupManager $groupManager): void { + IGroupManager $groupManager): void { $groupActions = new GroupManagement($logger); assert($groupManager instanceof GroupManager); @@ -167,7 +167,7 @@ class Application extends App implements IBootstrap { } private function appHooks(IAuditLogger $logger, - IEventDispatcher $eventDispatcher): void { + IEventDispatcher $eventDispatcher): void { $eventDispatcher->addListener(ManagerEvent::EVENT_APP_ENABLE, function (ManagerEvent $event) use ($logger) { $appActions = new AppManagement($logger); $appActions->enableApp($event->getAppID()); @@ -183,7 +183,7 @@ class Application extends App implements IBootstrap { } private function consoleHooks(IAuditLogger $logger, - IEventDispatcher $eventDispatcher): void { + IEventDispatcher $eventDispatcher): void { $eventDispatcher->addListener(ConsoleEvent::class, function (ConsoleEvent $event) use ($logger) { $appActions = new Console($logger); $appActions->runCommand($event->getArguments()); @@ -191,7 +191,7 @@ class Application extends App implements IBootstrap { } private function fileHooks(IAuditLogger $logger, - IEventDispatcher $eventDispatcher): void { + IEventDispatcher $eventDispatcher): void { $fileActions = new Files($logger); $eventDispatcher->addListener( BeforePreviewFetchedEvent::class, @@ -264,7 +264,7 @@ class Application extends App implements IBootstrap { } private function securityHooks(IAuditLogger $logger, - IEventDispatcher $eventDispatcher): void { + IEventDispatcher $eventDispatcher): void { $eventDispatcher->addListener(TwoFactorProviderChallengePassed::class, function (TwoFactorProviderChallengePassed $event) use ($logger) { $security = new Security($logger); $security->twofactorSuccess($event->getUser(), $event->getProvider()); diff --git a/apps/admin_audit/lib/BackgroundJobs/Rotate.php b/apps/admin_audit/lib/BackgroundJobs/Rotate.php index ce441be11f6..4482a45df4e 100755 --- a/apps/admin_audit/lib/BackgroundJobs/Rotate.php +++ b/apps/admin_audit/lib/BackgroundJobs/Rotate.php @@ -27,8 +27,8 @@ declare(strict_types=1); */ namespace OCA\AdminAudit\BackgroundJobs; -use OCP\BackgroundJob\TimedJob; use OCP\AppFramework\Utility\ITimeFactory; +use OCP\BackgroundJob\TimedJob; use OCP\IConfig; use OCP\Log\RotationTrait; |