Skip to content

Commit

Permalink
fix: php stan and cs linter
Browse files Browse the repository at this point in the history
  • Loading branch information
ga-devfront committed Jun 19, 2024
1 parent 2a53f2b commit 04c2045
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions classes/UpgradeTools/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion classes/ZipAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
1 change: 0 additions & 1 deletion tests/phpstan/phpstan-1.7.6.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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\.#'
Expand Down

0 comments on commit 04c2045

Please sign in to comment.