Skip to content

Commit

Permalink
NTR: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalij Mik committed Dec 20, 2024
1 parent 118de1b commit 9caa030
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Service/Cart/Voucher/VoucherCartCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Kiener\MolliePayments\Service\Cart\Voucher;

use Kiener\MolliePayments\Handler\Method\VoucherPayment;
use Kiener\MolliePayments\Repository\PaymentMethodRepository;
use Kiener\MolliePayments\Service\CustomFieldsInterface;
use Kiener\MolliePayments\Struct\LineItem\LineItemAttributes;
use Kiener\MolliePayments\Struct\Voucher\VoucherType;
Expand All @@ -21,7 +22,7 @@ class VoucherCartCollector implements CartDataCollectorInterface
public const VOUCHER_PERMITTED = 'mollie-voucher-permitted';

/**
* @var EntityRepository
* @var PaymentMethodRepository
*/
private $repoPaymentMethods;

Expand All @@ -33,9 +34,9 @@ class VoucherCartCollector implements CartDataCollectorInterface

/**
* @param VoucherService $voucherService
* @param EntityRepository $paymentMethodRepository
* @param PaymentMethodRepository $paymentMethodRepository
*/
public function __construct(VoucherService $voucherService, EntityRepository $paymentMethodRepository)
public function __construct(VoucherService $voucherService, PaymentMethodRepository $paymentMethodRepository)
{
$this->voucherService = $voucherService;
$this->repoPaymentMethods = $paymentMethodRepository;
Expand Down Expand Up @@ -111,7 +112,7 @@ private function getVoucherID(Context $context): string

// Get payment methods
/** @var array<string> $paymentMethods */
$paymentMethods = $this->repoPaymentMethods->searchIds($criteria, $context)->getIds();
$paymentMethods = $this->repoPaymentMethods->getRepository()->searchIds($criteria, $context)->getIds();

return (string)$paymentMethods[0];
}
Expand Down

0 comments on commit 9caa030

Please sign in to comment.