Skip to content

Commit

Permalink
[CS][DX] Refactor (Sylius#17347)
Browse files Browse the repository at this point in the history
This PR has been generated automatically.
For more details see
[refactor.yaml](/Sylius/Sylius/blob/1.12/.github/workflows/refactor.yaml).
  • Loading branch information
GSadee authored Oct 28, 2024
2 parents 5779498 + 9efe28e commit dcf5284
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
// Check if a Payum factory exists
$supportPayum = isset($this->payum->getGatewayFactories()[$factoryName]);

if(!$supportPayum) {
if (!$supportPayum) {
$gatewayConfig->setUsePayum(false);
}

Expand Down
1 change: 1 addition & 0 deletions src/Sylius/Bundle/PayumBundle/Model/GatewayConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class GatewayConfig extends BaseGatewayConfig implements GatewayConfigInterface
{
/** @var array<string, mixed> */
protected array $decryptedConfig;

protected bool $usePayum = true;

public function __construct()
Expand Down
2 changes: 1 addition & 1 deletion src/Sylius/Bundle/PayumBundle/Storage/DoctrineStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function findBy(array $criteria): array
/** @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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
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
Expand Down

0 comments on commit dcf5284

Please sign in to comment.