diff options
author | Hamid Dehnavi <hamid.dev.pro@gmail.com> | 2023-07-07 22:06:21 +0330 |
---|---|---|
committer | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-02-23 16:17:44 +0100 |
commit | b12e7e3ea42359ee5c56243538c05af38c884813 (patch) | |
tree | 348e3325a41d15acec736e4ef1fd5dcf32db0094 /apps/admin_audit/lib | |
parent | b0b4c7e042b4ea8348d8179744cff1ab643c9d00 (diff) | |
download | nextcloud-server-b12e7e3ea42359ee5c56243538c05af38c884813.tar.gz nextcloud-server-b12e7e3ea42359ee5c56243538c05af38c884813.zip |
Refactor admin_audit app
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
Diffstat (limited to 'apps/admin_audit/lib')
-rw-r--r-- | apps/admin_audit/lib/Actions/Console.php | 2 | ||||
-rw-r--r-- | apps/admin_audit/lib/AppInfo/Application.php | 3 | ||||
-rw-r--r-- | apps/admin_audit/lib/AuditLogger.php | 21 |
3 files changed, 12 insertions, 14 deletions
diff --git a/apps/admin_audit/lib/Actions/Console.php b/apps/admin_audit/lib/Actions/Console.php index a69d1f5ff82..4635fbecbf3 100644 --- a/apps/admin_audit/lib/Actions/Console.php +++ b/apps/admin_audit/lib/Actions/Console.php @@ -29,7 +29,7 @@ namespace OCA\AdminAudit\Actions; class Console extends Action { /** - * @param $arguments + * @param array $arguments */ public function runCommand(array $arguments): void { if (!isset($arguments[1]) || $arguments[1] === '_completion') { diff --git a/apps/admin_audit/lib/AppInfo/Application.php b/apps/admin_audit/lib/AppInfo/Application.php index d034e79e0c2..568f7d4892c 100644 --- a/apps/admin_audit/lib/AppInfo/Application.php +++ b/apps/admin_audit/lib/AppInfo/Application.php @@ -71,8 +71,7 @@ use Psr\Log\LoggerInterface; class Application extends App implements IBootstrap { - /** @var LoggerInterface */ - protected $logger; + protected LoggerInterface $logger; public function __construct() { parent::__construct('admin_audit'); diff --git a/apps/admin_audit/lib/AuditLogger.php b/apps/admin_audit/lib/AuditLogger.php index 0a7a330a743..c3265737409 100644 --- a/apps/admin_audit/lib/AuditLogger.php +++ b/apps/admin_audit/lib/AuditLogger.php @@ -32,8 +32,7 @@ use Psr\Log\LoggerInterface; */ class AuditLogger implements IAuditLogger { - /** @var LoggerInterface */ - private $parentLogger; + private LoggerInterface $parentLogger; public function __construct(ILogFactory $logFactory, IConfig $config) { $auditType = $config->getSystemValueString('log_type_audit', 'file'); @@ -50,39 +49,39 @@ class AuditLogger implements IAuditLogger { $this->parentLogger = $logFactory->getCustomPsrLogger($logFile, $auditType, $auditTag); } - public function emergency($message, array $context = array()) { + public function emergency($message, array $context = array()): void { $this->parentLogger->emergency($message, $context); } - public function alert($message, array $context = array()) { + public function alert($message, array $context = array()): void { $this->parentLogger->alert($message, $context); } - public function critical($message, array $context = array()) { + public function critical($message, array $context = array()): void { $this->parentLogger->critical($message, $context); } - public function error($message, array $context = array()) { + public function error($message, array $context = array()): void { $this->parentLogger->error($message, $context); } - public function warning($message, array $context = array()) { + public function warning($message, array $context = array()): void { $this->parentLogger->warning($message, $context); } - public function notice($message, array $context = array()) { + public function notice($message, array $context = array()): void { $this->parentLogger->notice($message, $context); } - public function info($message, array $context = array()) { + public function info($message, array $context = array()): void { $this->parentLogger->info($message, $context); } - public function debug($message, array $context = array()) { + public function debug($message, array $context = array()): void { $this->parentLogger->debug($message, $context); } - public function log($level, $message, array $context = array()) { + public function log($level, $message, array $context = array()): void { $this->parentLogger->log($level, $message, $context); } } |