Skip to content

Commit

Permalink
Merge pull request #38176 from danialRahimy/master
Browse files Browse the repository at this point in the history
Admin audit app: optimization according to PHP 8
  • Loading branch information
blizzz authored Jul 5, 2023
2 parents 86e7af1 + 91d50c5 commit 79d24bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
8 changes: 3 additions & 5 deletions apps/admin_audit/lib/Actions/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@
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
Expand Down
11 changes: 4 additions & 7 deletions apps/admin_audit/lib/BackgroundJobs/Rotate.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,12 @@
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);
}

Expand Down

0 comments on commit 79d24bf

Please sign in to comment.