From 4c7b39c35ee020f015cde96ac71763e0d736bac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=BCnch?= Date: Wed, 18 Dec 2024 12:30:14 +0100 Subject: [PATCH] fix: phpstan issues with wrong imported classes --- src/N98/Magento/Command/Config/GetCommand.php | 3 +-- src/N98/Magento/Command/Database/AbstractShowCommand.php | 3 +-- .../Magento/Command/Developer/EmailTemplate/UsageCommand.php | 3 +-- src/N98/Magento/Command/Developer/Theme/InfoCommand.php | 3 +-- src/N98/Magento/Command/Script/Repository/ListCommand.php | 4 +--- 5 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/N98/Magento/Command/Config/GetCommand.php b/src/N98/Magento/Command/Config/GetCommand.php index 84083d8d8..6b0bbfb72 100644 --- a/src/N98/Magento/Command/Config/GetCommand.php +++ b/src/N98/Magento/Command/Config/GetCommand.php @@ -2,7 +2,6 @@ namespace N98\Magento\Command\Config; -use Path; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -139,7 +138,7 @@ protected function renderAsTable(OutputInterface $output, $table, $format) $tableHelper = $this->getTableHelper(); $tableHelper - ->setHeaders([Path::class, 'Scope', 'Scope-ID', 'Value']) + ->setHeaders(['Path', 'Scope', 'Scope-ID', 'Value']) ->setRows($formattedTable) ->renderByFormat($output, $formattedTable, $format); } diff --git a/src/N98/Magento/Command/Database/AbstractShowCommand.php b/src/N98/Magento/Command/Database/AbstractShowCommand.php index 46a59a3bb..016371daa 100644 --- a/src/N98/Magento/Command/Database/AbstractShowCommand.php +++ b/src/N98/Magento/Command/Database/AbstractShowCommand.php @@ -2,7 +2,6 @@ namespace N98\Magento\Command\Database; -use Description; use N98\Util\Filesystem; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; @@ -92,7 +91,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int false === $this->_input->getOption('no-description'); $header = ['Variable Name', 'Value']; if (true === $hasDescription) { - $header[] = Description::class; + $header[] = 'Description'; } $this->renderTable($header, $this->generateRows($outputVars, $hasDescription)); diff --git a/src/N98/Magento/Command/Developer/EmailTemplate/UsageCommand.php b/src/N98/Magento/Command/Developer/EmailTemplate/UsageCommand.php index 9e69760ef..d4d9079db 100644 --- a/src/N98/Magento/Command/Developer/EmailTemplate/UsageCommand.php +++ b/src/N98/Magento/Command/Developer/EmailTemplate/UsageCommand.php @@ -6,7 +6,6 @@ use Mage_Adminhtml_Model_Email_Template; use Mage_Core_Model_Template; use N98\Magento\Command\AbstractMagentoCommand; -use Path; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -43,7 +42,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int if (!empty($templates)) { $tableHelper = $this->getTableHelper(); $tableHelper - ->setHeaders(['id', 'Name', 'Scope', 'Scope Id', Path::class]) + ->setHeaders(['id', 'Name', 'Scope', 'Scope Id', 'Path']) ->renderByFormat($output, $templates, $input->getOption('format')); } else { $output->writeln('No transactional email templates stored in the database.'); diff --git a/src/N98/Magento/Command/Developer/Theme/InfoCommand.php b/src/N98/Magento/Command/Developer/Theme/InfoCommand.php index cf70668d4..77b8a3c01 100644 --- a/src/N98/Magento/Command/Developer/Theme/InfoCommand.php +++ b/src/N98/Magento/Command/Developer/Theme/InfoCommand.php @@ -6,7 +6,6 @@ use Mage_Core_Model_Store; use N98\Magento\Command\AbstractMagentoCommand; use N98\Magento\Command\AbstractMagentoStoreConfigCommand; -use Parameter; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -69,7 +68,7 @@ protected function _displayTable(OutputInterface $output, Mage_Core_Model_Store $tableHelper = $this->getTableHelper(); $tableHelper - ->setHeaders([Parameter::class, 'Value']) + ->setHeaders(['Parameter', 'Value']) ->renderByFormat($output, $storeInfoLines); return $this; diff --git a/src/N98/Magento/Command/Script/Repository/ListCommand.php b/src/N98/Magento/Command/Script/Repository/ListCommand.php index 87e005a2e..0ed4eb797 100644 --- a/src/N98/Magento/Command/Script/Repository/ListCommand.php +++ b/src/N98/Magento/Command/Script/Repository/ListCommand.php @@ -2,8 +2,6 @@ namespace N98\Magento\Command\Script\Repository; -use Description; -use Location; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -66,7 +64,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $tableHelper = $this->getTableHelper(); $tableHelper - ->setHeaders(['Script', Location::class, Description::class]) + ->setHeaders(['Script', 'Location', 'Description']) ->renderByFormat($output, $table, $input->getOption('format')); return 0; }