Skip to content

Commit

Permalink
fix: Review [OLI] renamed function
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin-Freoua-Alma committed Oct 28, 2024
1 parent 55a7482 commit c7abceb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions alma/alma.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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');
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -628,7 +630,6 @@ public function getContent()
*/
public function renderPSAccount()
{
$this->checkCompatibilityPSModule();
$this->checkPsAccountCompatibility();
$this->setContainer();

Expand Down

0 comments on commit c7abceb

Please sign in to comment.