[CS][DX] Refactor

This commit is contained in:
Sylius Bot 2024-10-28 02:28:35 +00:00 committed by GitHub
parent a71f3659b5
commit 9efe28e35a
4 changed files with 3 additions and 3 deletions

View file

@ -48,7 +48,7 @@ final class PayumGatewayConfigTypeExtension extends AbstractTypeExtension
// Check if a Payum factory exists
$supportPayum = isset($this->payum->getGatewayFactories()[$factoryName]);
if(!$supportPayum) {
if (!$supportPayum) {
$gatewayConfig->setUsePayum(false);
}

View file

@ -20,6 +20,7 @@ class GatewayConfig extends BaseGatewayConfig implements GatewayConfigInterface
{
/** @var array<string, mixed> */
protected array $decryptedConfig;
protected bool $usePayum = true;
public function __construct()

View file

@ -39,7 +39,7 @@ class DoctrineStorage extends BaseDoctrineStorage
/** @var object[]|GatewayConfigInterface[] $resources */
$resources = parent::findBy($criteria);
return array_filter($resources, static function($resource) {
return array_filter($resources, static function ($resource) {
if (!$resource instanceof GatewayConfigInterface) {
return true;
}

View file

@ -17,7 +17,6 @@ use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Sylius\Component\Payment\Encryption\EncrypterInterface;
use Sylius\Component\Payment\Encryption\EntityEncrypterInterface;
use Sylius\Component\Payment\Encryption\PaymentRequestEncrypterInterface;
use Sylius\Component\Payment\Model\PaymentRequestInterface;
final class PaymentRequestEncrypterSpec extends ObjectBehavior