Skip to content

Commit 13deb8e

Browse files
committed
Add Array CS set
1 parent f1e06a1 commit 13deb8e

File tree

53 files changed

+759
-259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+759
-259
lines changed

Bridge/Guzzle/HttpClientFactory.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ public static function createGuzzle()
3131
$curl = curl_version();
3232

3333
$curlOptions = [
34-
CURLOPT_USERAGENT => sprintf('Payum/1.x curl/%s PHP/%s', $curl['version'], phpversion()),
35-
];
34+
CURLOPT_USERAGENT => sprintf('Payum/1.x curl/%s PHP/%s', $curl['version'], phpversion()),
35+
];
3636

3737
return new \GuzzleHttp\Client([
38-
'curl' => $curlOptions,
39-
]);
38+
'curl' => $curlOptions,
39+
]);
4040
}
4141

4242
/**

Bridge/Laminas/Storage/TableGatewayStorage.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,19 @@ public function findBy(array $criteria)
8383

8484
protected function doFind($id)
8585
{
86-
return $this->tableGateway->select(["{$this->idField} = ?" => $id])->current();
86+
return $this->tableGateway->select([
87+
"{$this->idField} = ?" => $id,
88+
])->current();
8789
}
8890

8991
protected function doUpdateModel($model)
9092
{
9193
if ($id = $this->getModelId($model)) {
9294
$this->tableGateway->update(
9395
$this->tableGateway->getResultSetPrototype()->getHydrator()->extract($model),
94-
["{$this->idField} = ?" => $id]
96+
[
97+
"{$this->idField} = ?" => $id,
98+
]
9599
);
96100
} else {
97101
$this->tableGateway->insert($this->tableGateway->getResultSetPrototype()->getHydrator()->extract($model));
@@ -100,7 +104,9 @@ protected function doUpdateModel($model)
100104

101105
protected function doDeleteModel($model)
102106
{
103-
$this->tableGateway->delete(["{$this->idField} = ?" => $this->getModelId($model)]);
107+
$this->tableGateway->delete([
108+
"{$this->idField} = ?" => $this->getModelId($model),
109+
]);
104110
}
105111

106112
protected function doGetIdentity($model)

Bridge/Symfony/Action/RenderTemplateAction.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ public function execute($request)
3939
$this->templating->render(
4040
$request->getTemplateName(),
4141
array_replace(
42-
['layout' => $this->layout],
42+
[
43+
'layout' => $this->layout,
44+
],
4345
$request->getParameters()
4446
)
4547
)

Bridge/Symfony/Form/Type/CreditCardType.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,15 @@ class CreditCardType extends AbstractType
1313
public function buildForm(FormBuilderInterface $builder, array $options)
1414
{
1515
$builder
16-
->add('holder', TextType::class, ['label' => 'form.credit_card.holder'])
17-
->add('number', TextType::class, ['label' => 'form.credit_card.number'])
18-
->add('securityCode', TextType::class, ['label' => 'form.credit_card.security_code'])
16+
->add('holder', TextType::class, [
17+
'label' => 'form.credit_card.holder',
18+
])
19+
->add('number', TextType::class, [
20+
'label' => 'form.credit_card.number',
21+
])
22+
->add('securityCode', TextType::class, [
23+
'label' => 'form.credit_card.security_code',
24+
])
1925
->add(
2026
'expireAt',
2127
CreditCardExpirationDateType::class,

Bridge/Symfony/Form/Type/GatewayChoiceType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct($defaultChoices)
2424
public function configureOptions(OptionsResolver $resolver)
2525
{
2626
$resolver->setDefaults([
27-
'choices' => $this->defaultChoices
27+
'choices' => $this->defaultChoices,
2828
]);
2929
}
3030

Bridge/Symfony/Form/Type/GatewayConfigType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function buildCredentials(FormEvent $event)
8080
public function configureOptions(OptionsResolver $resolver)
8181
{
8282
$resolver->setDefaults([
83-
'data_class' => GatewayConfig::class
83+
'data_class' => GatewayConfig::class,
8484
]);
8585
}
8686
}

Bridge/Symfony/Validator/Constraints/CreditCardDateValidator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public function validate($value, Constraint $constraint)
2424
if (! ($value instanceof \DateTime)) {
2525
if (method_exists($this->context, 'buildViolation')) {
2626
$this->context->buildViolation($constraint->invalidMessage, [
27-
'{{ value }}' => $value,
28-
])
27+
'{{ value }}' => $value,
28+
])
2929
->addViolation();
3030

3131
return;

Bridge/Twig/Action/RenderTemplateAction.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ public function execute($request)
3434
RequestNotSupportedException::assertSupports($this, $request);
3535

3636
$request->setResult($this->twig->render($request->getTemplateName(), array_replace(
37-
['layout' => $this->layout],
37+
[
38+
'layout' => $this->layout,
39+
],
3840
$request->getParameters()
3941
)));
4042
}

Registry/DynamicRegistry.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ public function getGateway($name)
6363
return $this->gateways[$name];
6464
}
6565

66-
if ($gatewayConfigs = $this->gatewayConfigStore->findBy(['gatewayName' => $name])) {
66+
if ($gatewayConfigs = $this->gatewayConfigStore->findBy([
67+
'gatewayName' => $name,
68+
])) {
6769
$gateway = $this->createGateway(array_shift($gatewayConfigs));
6870
$this->gateways[$name] = $gateway;
6971

Security/AbstractTokenFactory.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ public function createToken($gatewayName, $model, $targetPath, array $targetPara
3333
$token = $this->tokenStorage->create();
3434
$token->setHash($token->getHash() ?: Random::generateToken());
3535

36-
$targetParameters = array_replace(['payum_token' => $token->getHash()], $targetParameters);
36+
$targetParameters = array_replace([
37+
'payum_token' => $token->getHash(),
38+
], $targetParameters);
3739

3840
$token->setGatewayName($gatewayName);
3941

0 commit comments

Comments
 (0)