summaryrefslogtreecommitdiffstats
path: root/apps/admin_audit
diff options
context:
space:
mode:
authorDanial Rahimi <daniel_rahimi@outlook.com>2023-05-10 16:10:51 +0330
committerChristoph Wurst <christoph@winzerhof-wurst.at>2023-07-05 14:16:37 +0200
commit91d50c595f2299b823aad8822e56f68b6d71174b (patch)
treed23764a11f92eb6ec268ac03e66db3f5081fca36 /apps/admin_audit
parent21821d8303f2807ad63f0507318b0d7b45531d8c (diff)
downloadnextcloud-server-91d50c595f2299b823aad8822e56f68b6d71174b.tar.gz
nextcloud-server-91d50c595f2299b823aad8822e56f68b6d71174b.zip
Admin audit app: optimization according to PHP 8
Signed-off-by: Danial Rahimi <daniel_rahimi@outlook.com>
Diffstat (limited to 'apps/admin_audit')
-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);
}