Merge pull request #38176 from danialRahimy/master

Admin audit app: optimization according to PHP 8
This commit is contained in:
Arthur Schiwon 2023-07-05 15:53:00 +02:00 committed by GitHub
commit 79d24bfb8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 12 deletions

View file

@ -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
View 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);
}