* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ declare(strict_types=1); namespace PrestaShop\PrestaShop\Core\Domain\CustomerService\CommandHandler; use PrestaShop\PrestaShop\Core\Domain\CustomerService\Command\DeleteCustomerThreadCommand; use PrestaShop\PrestaShop\Core\Domain\CustomerService\Repository\CustomerThreadRepository; /** * Handles command for customer thread deletion */ class DeleteCustomerThreadHandler implements DeleteCustomerThreadHandlerInterface { /** * @var CustomerThreadRepository */ private $customerThreadRepository; public function __construct(CustomerThreadRepository $customerThreadRepository) { $this->customerThreadRepository = $customerThreadRepository; } /** * @param DeleteCustomerThreadCommand $command * * @return void */ public function handle(DeleteCustomerThreadCommand $command): void { $this->customerThreadRepository->delete($command->getCustomerThreadId()); } }