mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
Merge pull request #38176 from danialRahimy/master
Admin audit app: optimization according to PHP 8
This commit is contained in:
commit
79d24bfb8e
2 changed files with 7 additions and 12 deletions
|
|
@ -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
|
||||
|
|
|
|||
11
apps/admin_audit/lib/BackgroundJobs/Rotate.php
Normal file → Executable file
11
apps/admin_audit/lib/BackgroundJobs/Rotate.php
Normal file → Executable file
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue