Skip to content

Commit

Permalink
[PIPRES-468] shopContext -> context
Browse files Browse the repository at this point in the history
  • Loading branch information
MarijusCoding committed Nov 27, 2024
1 parent c5cbb62 commit e9f923e
Showing 5 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -108,16 +108,16 @@ public function getPaymentOption(MolPaymentMethod $paymentMethod): PaymentOption
{
$paymentOption = new PaymentOption();

/** @var Context $shopContext */
$shopContext = $this->module->getService(Context::class);
/** @var Context $context */
$context = $this->module->getService(Context::class);

/** @var PaymentMethodLangRepositoryInterface $paymentMethodLangRepository */
$paymentMethodLangRepository = $this->module->getService(PaymentMethodLangRepositoryInterface::class);

$paymentMethodLangObject = $paymentMethodLangRepository->findOneBy([
'id_method' => $paymentMethod->id_method,
'id_lang' => $shopContext->getLanguageId(),
'id_shop' => $shopContext->getShopId(),
'id_lang' => $context->getLanguageId(),
'id_shop' => $context->getShopId(),
]);

$paymentOption->setCallToActionText(
8 changes: 4 additions & 4 deletions src/Provider/PaymentOption/BasePaymentOptionProvider.php
Original file line number Diff line number Diff line change
@@ -107,16 +107,16 @@ public function getPaymentOption(MolPaymentMethod $paymentMethod): PaymentOption
{
$paymentOption = new PaymentOption();

/** @var Context $shopContext */
$shopContext = $this->module->getService(Context::class);
/** @var Context $context */
$context = $this->module->getService(Context::class);

/** @var PaymentMethodLangRepositoryInterface $paymentMethodLangRepository */
$paymentMethodLangRepository = $this->module->getService(PaymentMethodLangRepositoryInterface::class);

$paymentMethodLangObject = $paymentMethodLangRepository->findOneBy([
'id_method' => $paymentMethod->id_method,
'id_lang' => $shopContext->getLanguageId(),
'id_shop' => $shopContext->getShopId(),
'id_lang' => $context->getLanguageId(),
'id_shop' => $context->getShopId(),
]);

$paymentOption->setCallToActionText(
Original file line number Diff line number Diff line change
@@ -131,16 +131,16 @@ public function getPaymentOption(MolPaymentMethod $paymentMethod): PaymentOption
{
$paymentOption = new PaymentOption();

/** @var Context $shopContext */
$shopContext = $this->module->getService(Context::class);
/** @var Context $context */
$context = $this->module->getService(Context::class);

/** @var PaymentMethodLangRepositoryInterface $paymentMethodLangRepository */
$paymentMethodLangRepository = $this->module->getService(PaymentMethodLangRepositoryInterface::class);

$paymentMethodLangObject = $paymentMethodLangRepository->findOneBy([
'id_method' => $paymentMethod->id_method,
'id_lang' => $shopContext->getLanguageId(),
'id_shop' => $shopContext->getShopId(),
'id_lang' => $context->getLanguageId(),
'id_shop' => $context->getShopId(),
]);

$paymentOption->setCallToActionText(
Original file line number Diff line number Diff line change
@@ -128,16 +128,16 @@ public function getPaymentOption(MolPaymentMethod $paymentMethod): PaymentOption
{
$paymentOption = new PaymentOption();

/** @var Context $shopContext */
$shopContext = $this->module->getService(Context::class);
/** @var Context $context */
$context = $this->module->getService(Context::class);

/** @var PaymentMethodLangRepositoryInterface $paymentMethodLangRepository */
$paymentMethodLangRepository = $this->module->getService(PaymentMethodLangRepositoryInterface::class);

$paymentMethodLangObject = $paymentMethodLangRepository->findOneBy([
'id_method' => $paymentMethod->id_method,
'id_lang' => $shopContext->getLanguageId(),
'id_shop' => $shopContext->getShopId(),
'id_lang' => $context->getLanguageId(),
'id_shop' => $context->getShopId(),
]);

$paymentOption->setCallToActionText(
8 changes: 4 additions & 4 deletions src/Provider/PaymentOption/IdealPaymentOptionProvider.php
Original file line number Diff line number Diff line change
@@ -114,16 +114,16 @@ public function getPaymentOption(MolPaymentMethod $paymentMethod): PaymentOption
{
$paymentOption = new PaymentOption();

/** @var Context $shopContext */
$shopContext = $this->module->getService(Context::class);
/** @var Context $context */
$context = $this->module->getService(Context::class);

/** @var PaymentMethodLangRepositoryInterface $paymentMethodLangRepository */
$paymentMethodLangRepository = $this->module->getService(PaymentMethodLangRepositoryInterface::class);

$paymentMethodLangObject = $paymentMethodLangRepository->findOneBy([
'id_method' => $paymentMethod->id_method,
'id_lang' => $shopContext->getLanguageId(),
'id_shop' => $shopContext->getShopId(),
'id_lang' => $context->getLanguageId(),
'id_shop' => $context->getShopId(),
]);

$paymentOption->setCallToActionText(

0 comments on commit e9f923e

Please sign in to comment.