Skip to content

Commit ed3b397

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 926e3b7 commit ed3b397

File tree

1 file changed

+16
-22
lines changed

1 file changed

+16
-22
lines changed

Tests/OptionsResolverTest.php

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -531,13 +531,11 @@ public function testResolveFailsWithCorrectLevelsButWrongScalar()
531531
$this->resolver->setDefined('foo');
532532
$this->resolver->setAllowedTypes('foo', 'int[][]');
533533

534-
$this->resolver->resolve(
535-
[
536-
'foo' => [
537-
[1.2],
538-
],
539-
]
540-
);
534+
$this->resolver->resolve([
535+
'foo' => [
536+
[1.2],
537+
],
538+
]);
541539
}
542540

543541
/**
@@ -1598,13 +1596,11 @@ public function testNestedArrays()
15981596
1, 2,
15991597
],
16001598
],
1601-
], $this->resolver->resolve(
1602-
[
1603-
'foo' => [
1604-
[1, 2],
1605-
],
1606-
]
1607-
));
1599+
], $this->resolver->resolve([
1600+
'foo' => [
1601+
[1, 2],
1602+
],
1603+
]));
16081604
}
16091605

16101606
public function testNested2Arrays()
@@ -1644,17 +1640,15 @@ public function testNestedArraysException()
16441640
$this->resolver->setDefined('foo');
16451641
$this->resolver->setAllowedTypes('foo', 'float[][][][]');
16461642

1647-
$this->resolver->resolve(
1648-
[
1649-
'foo' => [
1643+
$this->resolver->resolve([
1644+
'foo' => [
1645+
[
16501646
[
1651-
[
1652-
[1, 2],
1653-
],
1647+
[1, 2],
16541648
],
16551649
],
1656-
]
1657-
);
1650+
],
1651+
]);
16581652
}
16591653

16601654
/**

0 commit comments

Comments
 (0)