8000 CS Fixes: Not double split with one array argument · rubenrua/symfony@027bd12 · GitHub
[go: up one dir, main page]

Skip to content

Commit 027bd12

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 713aab7 commit 027bd12

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

src/Symfony/Component/Form/Tests/ChoiceList/Factory/DefaultChoiceListFactoryTest.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,7 @@ protected function setUp()
9595
$this->obj2 = (object) ['label' => 'B', 'index' => 'x', 'value' => 'b', 'preferred' => true, 'group' => 'Group 1', 'attr' => ['attr1' => 'value1']];
9696
$this->obj3 = (object) ['label' => 'C', 'index' => 'y', 'value' => 1, 'preferred' => true, 'group' => 'Group 2', 'attr' => ['attr2' => 'value2']];
9797
$this->obj4 = (object) ['label' => 'D', 'index' => 'z', 'value' => 2, 'preferred' => false, 'group' => 'Group 2', 'attr' => []];
98-
$this->list = new ArrayChoiceList(
99-
['A' => $this->obj1, 'B' => $this->obj2, 'C' => $this->obj3, 'D' => $this->obj4]
100-
);
98+
$this->list = new ArrayChoiceList(['A' => $this->obj1, 'B' => $this->obj2, 'C' => $this->obj3, 'D' => $this->obj4]);
10199
$this->factory = new DefaultChoiceListFactory();
102100
}
103101

@@ -111,9 +109,7 @@ public function testCreateFromChoicesEmpty()
111109

112110
public function testCreateFromChoicesFlat()
113111
{
114-
$list = $this->factory->createListFromChoices(
115-
['A' => $this->obj1, 'B' => $this->obj2, 'C' => $this->obj3, 'D' => $this->obj4]
116-
);
112+
$list = $this->factory->createListFromChoices(['A' => $this->obj1, 'B' => $this->obj2, 'C' => $this->obj3, 'D' => $this->obj4]);
117113

118114
$this->assertObjectListWithGeneratedValues($list);
119115
}

src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1841,12 +1841,11 @@ public function testCustomChoiceTypeDoesNotInheritChoiceLabels()
18411841
{
18421842
$builder = $this->factory->createBuilder();
18431843
$builder->add('choice', static::TESTED_TYPE, [
1844-
'choices' => [
1845-
'1' => '1',
1846-
'2' => '2',
1847-
],
1848-
]
1849-
);
1844+
'choices' => [
1845+
'1' => '1',
1846+
'2' => '2',
1847+
],
1848+
]);
18501849
$builder->add('subChoice', 'Symfony\Component\Form\Tests\Fixtures\ChoiceSubType');
18511850
$form = $builder->getForm();
18521851

0 commit comments

Comments
 (0)
0