From 63a9d8ac87ef946446692302b4245ee639b22c83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=BCnch?= Date: Wed, 18 Dec 2024 12:35:27 +0100 Subject: [PATCH] fix: remove wrong "Path" class constant --- .../Developer/EmailTemplate/UsageCommand.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/N98/Magento/Command/Developer/EmailTemplate/UsageCommand.php b/src/N98/Magento/Command/Developer/EmailTemplate/UsageCommand.php index d4d9079db..49bea5df3 100644 --- a/src/N98/Magento/Command/Developer/EmailTemplate/UsageCommand.php +++ b/src/N98/Magento/Command/Developer/EmailTemplate/UsageCommand.php @@ -71,11 +71,21 @@ protected function findEmailTemplates() $configPaths = $template->getSystemConfigPathsWhereUsedCurrently(); if (!(is_countable($configPaths) ? count($configPaths) : 0)) { - $configPaths[] = ['scope' => 'Unused', 'scope_id' => 'Unused', 'path' => 'Unused']; + $configPaths[] = [ + 'scope' => 'Unused', + 'scope_id' => 'Unused', + 'path' => 'Unused', + ]; } foreach ($configPaths as $configPath) { - $return[] = ['id' => $this->sanitizeEmailProperty($template->getId()), 'Template Code' => $this->sanitizeEmailProperty($template->getTemplateCode()), 'Scope' => $this->sanitizeEmailProperty($configPath['scope']), 'Scope Id' => $this->sanitizeEmailProperty($configPath['scope_id']), Path::class => $this->sanitizeEmailProperty($configPath['path'])]; + $return[] = [ + 'id' => $this->sanitizeEmailProperty((string) $template->getId()), + 'Template Code' => $this->sanitizeEmailProperty($template->getTemplateCode()), + 'Scope' => $this->sanitizeEmailProperty($configPath['scope']), + 'Scope Id' => $this->sanitizeEmailProperty($configPath['scope_id']), + 'Path' => $this->sanitizeEmailProperty($configPath['path']), + ]; } }