diff --git a/classes/UpgradeTools/Translator.php b/classes/UpgradeTools/Translator.php index d92c7f7442..5e80526ebe 100644 --- a/classes/UpgradeTools/Translator.php +++ b/classes/UpgradeTools/Translator.php @@ -50,10 +50,8 @@ private function loadXlfFile($filePath) * * @return string Translated string with parameters applied */ - public function trans($id, array $parameters = [], $domain = 'Modules.Autoupgrade.Admin', $locale = null) + public function trans($id, array $parameters = [], $domain = null, $locale = null) { - $defaultDomain = 'Modules.Autoupgrade.Admin'; - // If PrestaShop core is not instantiated properly, do not try to translate if (!method_exists('\Context', 'getContext') || null === \Context::getContext()->language) { return $this->applyParameters($id, $parameters); diff --git a/classes/ZipAction.php b/classes/ZipAction.php index c13dcf958f..ff13e49451 100644 --- a/classes/ZipAction.php +++ b/classes/ZipAction.php @@ -29,8 +29,8 @@ use PrestaShop\Module\AutoUpgrade\Log\LoggerInterface; use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeConfiguration; -use Symfony\Component\Filesystem\Filesystem; use PrestaShop\Module\AutoUpgrade\UpgradeTools\Translator; +use Symfony\Component\Filesystem\Filesystem; class ZipAction { diff --git a/tests/phpstan/phpstan-1.7.6.neon b/tests/phpstan/phpstan-1.7.6.neon index abfb087775..8e15e84e64 100644 --- a/tests/phpstan/phpstan-1.7.6.neon +++ b/tests/phpstan/phpstan-1.7.6.neon @@ -8,7 +8,6 @@ parameters: - '#Access to an undefined property Module::\$installed.#' - '#Call to method fetchLocale\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Cldr\\Update.#' - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Cldr\\Update not found.#' - - '#Parameter \#1 \$id_hook of method ModuleCore::updatePosition\(\) expects bool, int given.#' - '#Call to method getContainer\(\) on an unknown class AdminKernel.#' - '#Method PrestaShop\\Module\\AutoUpgrade\\UpgradeTools\\SymfonyAdapter::initKernel\(\) has invalid return type AdminKernel.#' - '#Instantiated class AdminKernel not found\.#'