Skip to content

Commit

Permalink
fix: php stan
Browse files Browse the repository at this point in the history
  • Loading branch information
ga-devfront committed Feb 21, 2025
1 parent f751218 commit b1ca722
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions autoupgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public function hookDisplayBackOfficeHeader()
{
require_once _PS_ROOT_DIR_ . '/modules/autoupgrade/classes/VersionUtils.php';
if (!\PrestaShop\Module\AutoUpgrade\VersionUtils::isActualPHPVersionCompatible()) {
return;
return '';
}

$autoloadPath = __DIR__ . '/vendor/autoload.php';
Expand All @@ -219,7 +219,7 @@ public function hookDisplayBackOfficeHeader()
$default_controller = $tab->class_name;

if ($controller !== $default_controller) {
return;
return '';
}

require_once _PS_ROOT_DIR_ . '/modules/autoupgrade/classes/UpgradeContainer.php';
Expand All @@ -230,7 +230,7 @@ public function hookDisplayBackOfficeHeader()

// check if new version is available
if (!$container->getUpgrader()->isNewerVersionAvailableOnline()) {
return;
return '';
}

$twig = $container->getTwig();
Expand All @@ -252,8 +252,6 @@ public function hookDisplayBackOfficeHeader()

$updateType = \PrestaShop\Module\AutoUpgrade\VersionUtils::getUpdateType($psVersion, $onlineVersion);

$translator = $container->getTranslator();

$htmlToReturn .= $twig->render('@ModuleAutoUpgrade/hooks/external-layout.html.twig', [
'external_parent_id' => \PrestaShop\Module\AutoUpgrade\Twig\PageSelectors::EXTERNAL_PARENT_ID,
'component' => 'dialog-update-notification',
Expand All @@ -268,6 +266,9 @@ public function hookDisplayBackOfficeHeader()
return $htmlToReturn;
}

/**
* @return void
*/
public function hookActionAdminControllerSetMedia()
{
$this->context->controller->addCSS($this->_path . 'views/css/autoupgrade-external.css');
Expand Down

0 comments on commit b1ca722

Please sign in to comment.