aboutsummaryrefslogtreecommitdiffstats
path: root/apps/admin_audit/lib
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2023-07-05 15:53:00 +0200
committerGitHub <noreply@github.com>2023-07-05 15:53:00 +0200
commit79d24bfb8eebd82dd75b15c5503a4bb33563ee69 (patch)
tree5e3aeb57c6f53b64efb3ae9f338e22da4f7e66c4 /apps/admin_audit/lib
parent86e7af1d829830adcd833c00737001f111c533a8 (diff)
parent91d50c595f2299b823aad8822e56f68b6d71174b (diff)
downloadnextcloud-server-79d24bfb8eebd82dd75b15c5503a4bb33563ee69.tar.gz
nextcloud-server-79d24bfb8eebd82dd75b15c5503a4bb33563ee69.zip
Merge pull request #38176 from danialRahimy/master
Admin audit app: optimization according to PHP 8
Diffstat (limited to 'apps/admin_audit/lib')
-rw-r--r--apps/admin_audit/lib/Actions/Action.php8
-rwxr-xr-x[-rw-r--r--]apps/admin_audit/lib/BackgroundJobs/Rotate.php11
2 files changed, 7 insertions, 12 deletions
diff --git a/apps/admin_audit/lib/Actions/Action.php b/apps/admin_audit/lib/Actions/Action.php
index 0eaf06b8c0f..bfd67f474f9 100644
--- a/apps/admin_audit/lib/Actions/Action.php
+++ b/apps/admin_audit/lib/Actions/Action.php
@@ -31,12 +31,10 @@ namespace OCA\AdminAudit\Actions;
use OCA\AdminAudit\IAuditLogger;
class Action {
- /** @var IAuditLogger */
- private $logger;
- public function __construct(IAuditLogger $logger) {
- $this->logger = $logger;
- }
+ public function __construct(
+ private IAuditLogger $logger,
+ ) {}
/**
* Log a single action with a log level of info
diff --git a/apps/admin_audit/lib/BackgroundJobs/Rotate.php b/apps/admin_audit/lib/BackgroundJobs/Rotate.php
index 9526be6f7b1..ce441be11f6 100644..100755
--- a/apps/admin_audit/lib/BackgroundJobs/Rotate.php
+++ b/apps/admin_audit/lib/BackgroundJobs/Rotate.php
@@ -35,15 +35,12 @@ use OCP\Log\RotationTrait;
class Rotate extends TimedJob {
use RotationTrait;
- /** @var IConfig */
- private $config;
-
- public function __construct(ITimeFactory $time,
- IConfig $config) {
+ public function __construct(
+ ITimeFactory $time,
+ private IConfig $config,
+ ) {
parent::__construct($time);
- $this->config = $config;
-
$this->setInterval(60 * 60 * 3);
}