From c7abcebdd188c4dcec7ca6983d02714907ec1cce Mon Sep 17 00:00:00 2001 From: Benjamin Freoua Date: Mon, 28 Oct 2024 19:02:17 +0100 Subject: [PATCH] fix: Review [OLI] renamed function --- alma/alma.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/alma/alma.php b/alma/alma.php index 409b864f..8b5d53bc 100644 --- a/alma/alma.php +++ b/alma/alma.php @@ -131,7 +131,7 @@ public function __construct() * * @throws \Alma\PrestaShop\Exceptions\CompatibilityPsAccountException */ - public function checkCompatibilityPSModule() + public function checkPsAccountPresence() { if (_PS_MODE_DEV_ === true) { throw new \Alma\PrestaShop\Exceptions\CompatibilityPsAccountException('[Alma] Debug mode is activated'); @@ -156,9 +156,11 @@ public function checkCompatibilityPSModule() * @return void * * @throws \PrestaShop\PsAccountsInstaller\Installer\Exception\ModuleNotInstalledException + * @throws \Alma\PrestaShop\Exceptions\CompatibilityPsAccountException */ public function checkPsAccountCompatibility() { + $this->checkPsAccountPresence(); $psAccountModule = \Module::getInstanceByName('ps_accounts'); if (!$psAccountModule) { throw new \PrestaShop\PsAccountsInstaller\Installer\Exception\ModuleNotInstalledException('[Alma] PS Account is not installed'); @@ -242,7 +244,7 @@ private function checkCoreInstall($coreInstall) public function install() { try { - $this->checkCompatibilityPSModule(); + $this->checkPsAccountPresence(); $this->setContainer(); $this->getService('alma.ps_accounts_installer')->install(); } catch (\Alma\PrestaShop\Exceptions\CompatibilityPsAccountException $e) { @@ -628,7 +630,6 @@ public function getContent() */ public function renderPSAccount() { - $this->checkCompatibilityPSModule(); $this->checkPsAccountCompatibility(); $this->setContainer();