mailRepositoryFactory->createMailLogRepository(); } public function createMailService(): MailService { return $this->mailService ??= new MailService( $this->createMailLogRepository(), $this->createSettingGateway() ); } public function createMailLogService(): MailLogService { return $this->mailLogService ??= new MailLogService($this->createMailLogRepository()); } private function createSettingGateway(): SettingGateway { return $this->settingGateway; } }