From e66c24db028ac5d9646f25b1bc997206931c7d51 Mon Sep 17 00:00:00 2001 From: Mikel Madariaga Date: Fri, 20 May 2022 10:19:37 +0200 Subject: [PATCH] CommandPersister refactoring --- .../Service/Lifecycle/CommandPersister.php | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/Infrastructure/Domain/Service/Lifecycle/CommandPersister.php b/Infrastructure/Domain/Service/Lifecycle/CommandPersister.php index 03da8e1..affd543 100755 --- a/Infrastructure/Domain/Service/Lifecycle/CommandPersister.php +++ b/Infrastructure/Domain/Service/Lifecycle/CommandPersister.php @@ -12,23 +12,14 @@ class CommandPersister { - protected $commandEventSubscriber; - protected $entityEventSubscriber; - protected $entityPersister; - protected $logger; - protected $latestCommandlog; public function __construct( - CommandEventSubscriber $commandEventSubscriber, - EntityEventSubscriber $entityEventSubscriber, - EntityPersisterInterface $entityPersister, - LoggerInterface $logger + private CommandEventSubscriber $commandEventSubscriber, + private EntityEventSubscriber $entityEventSubscriber, + private EntityPersisterInterface $entityPersister, + private LoggerInterface $logger ) { - $this->commandEventSubscriber = $commandEventSubscriber; - $this->entityEventSubscriber = $entityEventSubscriber; - $this->entityPersister = $entityPersister; - $this->logger = $logger; } /**