Skip to content

Commit

Permalink
Minor style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lchrusciel committed Oct 31, 2024
1 parent a5a4fa7 commit 2d659be
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 17 deletions.
12 changes: 0 additions & 12 deletions src/Model/GatewayConfigInterface.php

This file was deleted.

3 changes: 1 addition & 2 deletions src/Repository/FindByChannelWithGatewayConfigTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ public function findByChannelAndGatewayConfigNameWithGatewayConfig(ChannelInterf
{
return $this->createQueryBuilder('o')
->addSelect('gatewayConfig')
->leftJoin('o.gatewayConfig', 'gatewayConfig')
->innerJoin('o.gatewayConfig', 'gatewayConfig', Join::WITH, 'gatewayConfig.gatewayName = :gatewayName')
->where('o.enabled = :enabled')
->andWhere(':channel MEMBER OF o.channels')
->andWhere('gatewayConfig.gatewayName = :gatewayName')
->setParameter('enabled', true)
->setParameter('channel', $channel)
->setParameter('gatewayName', $gatewayConfigName)
Expand Down
5 changes: 3 additions & 2 deletions src/Tpay/Provider/ValidTpayChannelListProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
namespace CommerceWeavers\SyliusTpayPlugin\Tpay\Provider;

use App\Repository\PaymentMethodRepositoryInterface;
use CommerceWeavers\SyliusTpayPlugin\Model\GatewayConfigInterface;
use CommerceWeavers\SyliusTpayPlugin\Payum\Exception\UnableToGetBankListException;
use CommerceWeavers\SyliusTpayPlugin\Tpay\PayGroup;
use CommerceWeavers\SyliusTpayPlugin\Tpay\PaymentType;
use Payum\Core\Security\CryptedInterface;
use Payum\Core\Security\CypherInterface;
use Sylius\Bundle\PayumBundle\Model\GatewayConfigInterface;
use Sylius\Component\Channel\Context\ChannelContextInterface;
use Sylius\Component\Core\Model\PaymentMethodInterface;
use Webmozart\Assert\Assert;
Expand Down Expand Up @@ -39,7 +40,7 @@ public function provide(): array
$paymentMethodsToRemoveByGroupId = [];
$hasPblPaymentAvailable = false;
foreach ($paymentMethods as $paymentMethod) {
/** @var GatewayConfigInterface|null $tpayGatewayConfig */
/** @var (GatewayConfigInterface&CryptedInterface)|null $tpayGatewayConfig */
$tpayGatewayConfig = $paymentMethod->getGatewayConfig();

if (null === $tpayGatewayConfig) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
namespace Tests\CommerceWeavers\SyliusTpayPlugin\Unit\Tpay\Provider;

use App\Repository\PaymentMethodRepositoryInterface;
use CommerceWeavers\SyliusTpayPlugin\Model\GatewayConfigInterface;
use CommerceWeavers\SyliusTpayPlugin\Payum\Exception\UnableToGetBankListException;
use CommerceWeavers\SyliusTpayPlugin\Tpay\Provider\AvailableTpayChannelListProviderInterface;
use CommerceWeavers\SyliusTpayPlugin\Tpay\Provider\ValidTpayChannelListProvider;
use Payum\Core\Security\CypherInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Sylius\Bundle\PayumBundle\Model\GatewayConfigInterface;
use Sylius\Component\Channel\Context\ChannelContextInterface;
use Sylius\Component\Core\Model\ChannelInterface;
use Sylius\Component\Core\Model\PaymentMethodInterface;
Expand Down

0 comments on commit 2d659be

Please sign in to comment.