From e5449d300973a669646bf8b6b9f716b3097b58d8 Mon Sep 17 00:00:00 2001 From: Thibault Dockx <thibault.dockx@fusiondirectory.org> Date: Mon, 26 Aug 2024 16:47:03 +0100 Subject: [PATCH] :sparkles: Feat(Integrator) - Separation of orchestrator and potential CLI call --- src/FusionDirectory/Audit/AuditLib.php | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/FusionDirectory/Audit/AuditLib.php b/src/FusionDirectory/Audit/AuditLib.php index e74379a..f6e86e3 100644 --- a/src/FusionDirectory/Audit/AuditLib.php +++ b/src/FusionDirectory/Audit/AuditLib.php @@ -11,14 +11,21 @@ use FusionDirectory\Ldap; class AuditLib { - private string $subTaskDN, $subTaskCN; - private int $auditRetention; - // Usage of CLI bool is to make sure we use proper method in case of direct CLI call. (Instead of Orchestrator). - private array $auditList; - private Ldap\Link $ldapBind; - private object $gateway; - - public function __construct (int $auditRetention, array $auditList, $gateway = NULL, string $subTaskDN = NULL, string $subTaskCN = NULL, $ldapBind = NULL) + private int $auditRetention; + private ?string $subTaskDN; + private ?string $subTaskCN; + private array $auditList; + private ?Ldap\Link $ldapBind; + private ?object $gateway; + + public function __construct ( + int $auditRetention, + array $auditList, + ?object $gateway = NULL, + ?string $subTaskDN = NULL, + ?string $subTaskCN = NULL, + ?Ldap\Link $ldapBind = NULL + ) { $this->auditRetention = $auditRetention; $this->subTaskDN = $subTaskDN; -- GitLab