Browse Source
Admin audit app: optimization according to PHP 8
Signed-off-by: Danial Rahimi <daniel_rahimi@outlook.com>
pull/38176/head
Danial Rahimi
3 years ago
committed by
Christoph Wurst
No known key found for this signature in database
GPG Key ID: CC42AC2A7F0E56D8
2 changed files with
7 additions and
12 deletions
-
apps/admin_audit/lib/Actions/Action.php
-
apps/admin_audit/lib/BackgroundJobs/Rotate.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 |
|
|
|
|
|
|
|
@ -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); |
|
|
|
} |
|
|
|
|
|
|
|
|