Skip to content

Commit

Permalink
fix: remove wrong "Path" class constant
Browse files Browse the repository at this point in the history
  • Loading branch information
cmuench committed Dec 18, 2024
1 parent 3cadb9d commit 63a9d8a
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/N98/Magento/Command/Developer/EmailTemplate/UsageCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']),
];
}
}

Expand Down

0 comments on commit 63a9d8a

Please sign in to comment.