Skip to content

Commit d131e43

Browse files
keradusnicolas-grekas
authored andcommitted
chore: CS fixes
1 parent 0981f0b commit d131e43

12 files changed

+49
-55
lines changed

AbstractTypeExtension.php

-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
*/
1919
abstract class AbstractTypeExtension implements FormTypeExtensionInterface
2020
{
21-
/**
22-
* @return void
23-
*/
2421
public function configureOptions(OptionsResolver $resolver): void
2522
{
2623
}

FormTypeExtensionInterface.php

-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ interface FormTypeExtensionInterface
2525
*/
2626
public static function getExtendedTypes(): iterable;
2727

28-
/**
29-
* @return void
30-
*/
3128
public function configureOptions(OptionsResolver $resolver): void;
3229

3330
/**

Tests/ChoiceList/Factory/DefaultChoiceListFactoryTest.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ public function testCreateFromChoicesGroupedTraversable()
159159
{
160160
$list = $this->factory->createListFromChoices(
161161
new \ArrayIterator([
162-
'Group 1' => ['A' => $this->obj1, 'B' => $this->obj2],
163-
'Group 2' => ['C' => $this->obj3, 'D' => $this->obj4],
164-
])
162+
'Group 1' => ['A' => $this->obj1, 'B' => $this->obj2],
163+
'Group 2' => ['C' => $this->obj3, 'D' => $this->obj4],
164+
])
165165
);
166166

167167
$this->assertObjectListWithGeneratedValues($list);
@@ -941,7 +941,7 @@ private function assertFlatViewWithAttr($view)
941941
'C',
942942
['attr2' => 'value2']
943943
),
944-
]
944+
]
945945
), $view);
946946
}
947947

@@ -987,7 +987,7 @@ private function assertGroupedView($view)
987987
'Group 2',
988988
[2 => new ChoiceView($this->obj3, '2', 'C')]
989989
),
990-
]
990+
]
991991
), $view);
992992
}
993993

Tests/ChoiceList/Loader/CallbackChoiceLoaderTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ public function testLoadChoicesForValuesLoadsChoiceListOnFirstCall()
6969
public function testLoadValuesForChoicesCastsCallbackItemsToString()
7070
{
7171
$choices = [
72-
(object) ['id' => 2],
73-
(object) ['id' => 3],
72+
(object) ['id' => 2],
73+
(object) ['id' => 3],
7474
];
7575

7676
$value = fn ($item) => $item->id;

Tests/Extension/Core/Type/ChoiceTypeTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1895,8 +1895,8 @@ public function testInitializeWithEmptyChoices()
18951895
{
18961896
$this->assertInstanceOf(
18971897
FormInterface::class, $this->factory->createNamed('name', static::TESTED_TYPE, null, [
1898-
'choices' => [],
1899-
]));
1898+
'choices' => [],
1899+
]));
19001900
}
19011901

19021902
public function testInitializeWithDefaultObjectChoice()

Tests/Extension/Core/Type/FormTypeTest.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -156,24 +156,24 @@ public function testDataClassMayBeNull()
156156
{
157157
$this->assertInstanceOf(
158158
FormBuilderInterface::class, $this->factory->createBuilder(static::TESTED_TYPE, null, [
159-
'data_class' => null,
160-
]));
159+
'data_class' => null,
160+
]));
161161
}
162162

163163
public function testDataClassMayBeAbstractClass()
164164
{
165165
$this->assertInstanceOf(
166166
FormBuilderInterface::class, $this->factory->createBuilder(static::TESTED_TYPE, null, [
167-
'data_class' => 'Symfony\Component\Form\Tests\Fixtures\AbstractAuthor',
168-
]));
167+
'data_class' => 'Symfony\Component\Form\Tests\Fixtures\AbstractAuthor',
168+
]));
169169
}
170170

171171
public function testDataClassMayBeInterface()
172172
{
173173
$this->assertInstanceOf(
174174
FormBuilderInterface::class, $this->factory->createBuilder(static::TESTED_TYPE, null, [
175-
'data_class' => 'Symfony\Component\Form\Tests\Fixtures\AuthorInterface',
176-
]));
175+
'data_class' => 'Symfony\Component\Form\Tests\Fixtures\AuthorInterface',
176+
]));
177177
}
178178

179179
public function testDataClassMustBeValidClassOrInterface()
@@ -402,7 +402,7 @@ public function testSubformCallsSettersIfTheObjectChanged()
402402
// referenceCopy has a getter that returns a copy
403403
'referenceCopy' => [
404404
'firstName' => 'Foo',
405-
],
405+
],
406406
]);
407407

408408
$this->assertEquals('Foo', $author->getReferenceCopy()->firstName);
@@ -680,8 +680,8 @@ public function testDataMapperTransformationFailedExceptionInvalidMessageIsUsed(
680680
public function testPassZeroLabelToView()
681681
{
682682
$view = $this->factory->create(static::TESTED_TYPE, null, [
683-
'label' => '0',
684-
])
683+
'label' => '0',
684+
])
685685
->createView();
686686

687687
$this->assertSame('0', $view->vars['label']);

Tests/Extension/DataCollector/FormDataCollectorTest.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function testBuildPreliminaryFormTree()
7171
],
7272
'errors' => [],
7373
'children' => [],
74-
];
74+
];
7575

7676
$formData = [
7777
'id' => 'name',
@@ -87,11 +87,11 @@ public function testBuildPreliminaryFormTree()
8787
'norm' => null,
8888
],
8989
'errors' => [],
90-
'has_children_error' => false,
91-
'children' => [
92-
'child' => $childFormData,
93-
],
94-
];
90+
'has_children_error' => false,
91+
'children' => [
92+
'child' => $childFormData,
93+
],
94+
];
9595

9696
$this->assertEquals([
9797
'forms' => [
@@ -102,7 +102,7 @@ public function testBuildPreliminaryFormTree()
102102
spl_object_hash($this->childForm) => $childFormData,
103103
],
104104
'nb_errors' => 0,
105-
], $this->dataCollector->getData());
105+
], $this->dataCollector->getData());
106106
}
107107

108108
public function testBuildMultiplePreliminaryFormTrees()

Tests/Extension/Validator/Constraints/FormValidatorFunctionalTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ public function testFieldConstraintsInvalidateFormIfFieldIsSubmitted()
8888
public function testNonCompositeConstraintValidatedOnce()
8989
{
9090
$form = $this->formFactory->create(TextType::class, null, [
91-
'constraints' => [new NotBlank(['groups' => ['foo', 'bar']])],
92-
'validation_groups' => ['foo', 'bar'],
93-
]);
91+
'constraints' => [new NotBlank(['groups' => ['foo', 'bar']])],
92+
'validation_groups' => ['foo', 'bar'],
93+
]);
9494
$form->submit('');
9595

9696
$violations = $this->validator->validate($form);

Tests/Extension/Validator/Constraints/FormValidatorTest.php

+15-15
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ public function testDontValidateIfNoValidationGroups()
184184
$object = new \stdClass();
185185

186186
$form = $this->getBuilder('name', '\stdClass', [
187-
'validation_groups' => [],
188-
])
187+
'validation_groups' => [],
188+
])
189189
->setData($object)
190190
->setCompound(true)
191191
->setDataMapper(new DataMapper())
@@ -256,12 +256,12 @@ public function testDontValidateIfNotSynchronized()
256256
$object = new \stdClass();
257257

258258
$form = $this->getBuilder('name', '\stdClass', [
259-
'invalid_message' => 'invalid_message_key',
260-
// Invalid message parameters must be supported, because the
261-
// invalid message can be a translation key
262-
// see https://github.com/symfony/symfony/issues/5144
263-
'invalid_message_parameters' => ['{{ foo }}' => 'bar'],
264-
])
259+
'invalid_message' => 'invalid_message_key',
260+
// Invalid message parameters must be supported, because the
261+
// invalid message can be a translation key
262+
// see https://github.com/symfony/symfony/issues/5144
263+
'invalid_message_parameters' => ['{{ foo }}' => 'bar'],
264+
])
265265
->setData($object)
266266
->addViewTransformer(new CallbackTransformer(
267267
static fn ($data) => $data,
@@ -292,13 +292,13 @@ public function testAddInvalidErrorEvenIfNoValidationGroups()
292292
$object = new \stdClass();
293293

294294
$form = $this->getBuilder('name', '\stdClass', [
295-
'invalid_message' => 'invalid_message_key',
296-
// Invalid message parameters must be supported, because the
297-
// invalid message can be a translation key
298-
// see https://github.com/symfony/symfony/issues/5144
299-
'invalid_message_parameters' => ['{{ foo }}' => 'bar'],
300-
'validation_groups' => [],
301-
])
295+
'invalid_message' => 'invalid_message_key',
296+
// Invalid message parameters must be supported, because the
297+
// invalid message can be a translation key
298+
// see https://github.com/symfony/symfony/issues/5144
299+
'invalid_message_parameters' => ['{{ foo }}' => 'bar'],
300+
'validation_groups' => [],
301+
])
302302
->setData($object)
303303
->addViewTransformer(new CallbackTransformer(
304304
static fn ($data) => $data,

Tests/NativeRequestHandlerTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ public function testMethodOverrideHeaderIgnoredIfNotPost()
172172
$form = $this->createForm('param1', 'POST');
173173

174174
$this->setRequestData('GET', [
175-
'param1' => 'DATA',
176-
]);
175+
'param1' => 'DATA',
176+
]);
177177

178178
$_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'] = 'PUT';
179179

Tests/SimpleFormTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,9 @@ public function testSetDataConvertsScalarToStringIfOnlyModelTransformer()
503503
{
504504
$form = $this->getBuilder()
505505
->addModelTransformer(new FixedDataTransformer([
506-
'' => '',
507-
1 => 23,
508-
]))
506+
'' => '',
507+
1 => 23,
508+
]))
509509
->getForm();
510510

511511
$form->setData(1);

Tests/Util/StringUtilTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public static function spaceProvider(): array
5656
['0020'],
5757
['00A0'],
5858
['1680'],
59-
// ['180E'],
59+
// ['180E'],
6060
['2000'],
6161
['2001'],
6262
['2002'],

0 commit comments

Comments
 (0)