Skip to content

Commit 154b214

Browse files
committed
CS Fixes: Not double split with one array argument
Keep to use the same CS in all the Symfony code base. Use: ```php $resolver->setDefaults([ 'compound' => false ]); ``` Instead of: ```php $resolver->setDefaults( [ 'compound' => false, ] ); ``` Keep the double split when the method has two or more arguments. I miss a PSR with this rule.
1 parent 7d190c0 commit 154b214

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

Tests/Constraints/ChoiceValidatorTest.php

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,10 @@ public function testNullIsValid()
5555
{
5656
$this->validator->validate(
5757
null,
58-
new Choice(
59-
[
60-
'choices' => ['foo', 'bar'],
61-
'strict' => true,
62-
]
63-
)
58+
new Choice([
59+
'choices' => ['foo', 'bar'],
60+
'strict' => true,
61+
])
6462
);
6563

6664
$this->assertNoViolation();
@@ -102,14 +100,12 @@ public function testValidChoiceCallbackFunction()
102100

103101
public function testValidChoiceCallbackClosure()
104102
{
105-
$constraint = new Choice(
106-
[
107-
'strict' => true,
108-
'callback' => function () {
109-
return ['foo', 'bar'];
110-
},
111-
]
112-
);
103+
$constraint = new Choice([
104+
'strict' => true,
105+
'callback' => function () {
106+
return ['foo', 'bar'];
107+
},
108+
]);
113109

114110
$this->validator->validate('bar', $constraint);
115111

0 commit comments

Comments
 (0)