Skip to content

Commit db35f2e

Browse files
committed
Fix CS
1 parent e7c7d1d commit db35f2e

13 files changed

+174
-168
lines changed

Extension/Core/DataTransformer/DateTimeToArrayTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public function reverseTransform($value)
168168
$value['hour'] ?? $this->referenceDate->format('H'),
169169
$value['minute'] ?? $this->referenceDate->format('i'),
170170
$value['second'] ?? $this->referenceDate->format('s')
171-
),
171+
),
172172
new \DateTimeZone($this->outputTimezone)
173173
);
174174

Extension/Core/Type/DateTimeType.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,23 +324,23 @@ public function configureOptions(OptionsResolver $resolver)
324324
$resolver->setDeprecated('date_format', function (Options $options, $dateFormat) {
325325
if (null !== $dateFormat && 'single_text' === $options['widget'] && self::HTML5_FORMAT === $options['format']) {
326326
return sprintf('Using the "date_format" option of %s with an HTML5 date widget is deprecated since Symfony 4.3 and will lead to an exception in 5.0.', self::class);
327-
//throw new LogicException(sprintf('Cannot use the "date_format" option of the "%s" with an HTML5 date.', self::class));
327+
// throw new LogicException(sprintf('Cannot use the "date_format" option of the "%s" with an HTML5 date.', self::class));
328328
}
329329

330330
return '';
331331
});
332332
$resolver->setDeprecated('date_widget', function (Options $options, $dateWidget) {
333333
if (null !== $dateWidget && 'single_text' === $options['widget']) {
334334
return sprintf('Using the "date_widget" option of %s when the "widget" option is set to "single_text" is deprecated since Symfony 4.3 and will lead to an exception in 5.0.', self::class);
335-
//throw new LogicException(sprintf('Cannot use the "date_widget" option of the "%s" when the "widget" option is set to "single_text".', self::class));
335+
// throw new LogicException(sprintf('Cannot use the "date_widget" option of the "%s" when the "widget" option is set to "single_text".', self::class));
336336
}
337337

338338
return '';
339339
});
340340
$resolver->setDeprecated('time_widget', function (Options $options, $timeWidget) {
341341
if (null !== $timeWidget && 'single_text' === $options['widget']) {
342342
return sprintf('Using the "time_widget" option of %s when the "widget" option is set to "single_text" is deprecated since Symfony 4.3 and will lead to an exception in 5.0.', self::class);
343-
//throw new LogicException(sprintf('Cannot use the "time_widget" option of the "%s" when the "widget" option is set to "single_text".', self::class));
343+
// throw new LogicException(sprintf('Cannot use the "time_widget" option of the "%s" when the "widget" option is set to "single_text".', self::class));
344344
}
345345

346346
return '';
@@ -356,7 +356,7 @@ public function configureOptions(OptionsResolver $resolver)
356356

357357
if ($html5 && self::HTML5_FORMAT !== $format) {
358358
return sprintf('Using a custom format when the "html5" option of %s is enabled is deprecated since Symfony 4.3 and will lead to an exception in 5.0.', self::class);
359-
//throw new LogicException(sprintf('Cannot use the "format" option of "%s" when the "html5" option is disabled.', self::class));
359+
// throw new LogicException(sprintf('Cannot use the "format" option of "%s" when the "html5" option is disabled.', self::class));
360360
}
361361

362362
return '';

Extension/Core/Type/DateType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ public function configureOptions(OptionsResolver $resolver)
335335

336336
if ($html5 && 'single_text' === $widget && self::HTML5_FORMAT !== $format) {
337337
return sprintf('Using a custom format when the "html5" option of %s is enabled is deprecated since Symfony 4.3 and will lead to an exception in 5.0.', self::class);
338-
//throw new LogicException(sprintf('Cannot use the "format" option of "%s" when the "html5" option is disabled.', self::class));
338+
// throw new LogicException(sprintf('Cannot use the "format" option of "%s" when the "html5" option is disabled.', self::class));
339339
}
340340

341341
return '';

Extension/Core/Type/FileType.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,11 @@ private static function getMaxFilesize()
200200

201201
switch (substr($iniMax, -1)) {
202202
case 't': $max *= 1024;
203+
// no break
203204
case 'g': $max *= 1024;
205+
// no break
204206
case 'm': $max *= 1024;
207+
// no break
205208
case 'k': $max *= 1024;
206209
}
207210

Extension/DataCollector/FormDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function __construct(FormDataExtractorInterface $dataExtractor)
8585
*
8686
* @param \Throwable|null $exception
8787
*/
88-
public function collect(Request $request, Response $response/*, \Throwable $exception = null*/)
88+
public function collect(Request $request, Response $response/* , \Throwable $exception = null */)
8989
{
9090
}
9191

Tests/AbstractDivLayoutTest.php

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function testRow()
2424
$html = $this->renderRow($view);
2525

2626
$this->assertMatchesXpath($html,
27-
'/div
27+
'/div
2828
[
2929
./label[@for="name"]
3030
/following-sibling::ul
@@ -46,7 +46,7 @@ public function testRowOverrideVariables()
4646
]);
4747

4848
$this->assertMatchesXpath($html,
49-
'/div
49+
'/div
5050
[
5151
./label[@for="name"][@class="my&label&class required"][.="[trans]foo&bar[/trans]"]
5252
/following-sibling::input[@id="name"][@class="my&class"]
@@ -68,7 +68,7 @@ public function testRepeatedRow()
6868
// (see RepeatedTypeValidatorExtension)
6969

7070
$this->assertMatchesXpath($html,
71-
'/div
71+
'/div
7272
[
7373
./label[@for="name_first"]
7474
/following-sibling::input[@id="name_first"]
@@ -89,7 +89,7 @@ public function testButtonRow()
8989
$html = $this->renderRow($view);
9090

9191
$this->assertMatchesXpath($html,
92-
'/div
92+
'/div
9393
[
9494
./button[@type="button"][@name="name"]
9595
]
@@ -119,7 +119,7 @@ public function testRest()
119119
$html = $this->renderRest($view);
120120

121121
$this->assertMatchesXpath($html,
122-
'/div
122+
'/div
123123
[
124124
./label[@for="name_field1"]
125125
/following-sibling::input[@type="text"][@id="name_field1"]
@@ -165,7 +165,7 @@ public function testRestWithChildrenForms()
165165
$html = $this->renderRest($view);
166166

167167
$this->assertMatchesXpath($html,
168-
'/div
168+
'/div
169169
[
170170
./label[not(@for)]
171171
/following-sibling::div[@id="parent_child1"]
@@ -210,7 +210,7 @@ public function testRestAndRepeatedWithRow()
210210
$html = $this->renderRest($view);
211211

212212
$this->assertMatchesXpath($html,
213-
'/div
213+
'/div
214214
[
215215
./label[@for="name_first"]
216216
/following-sibling::input[@type="text"][@id="name_first"]
@@ -237,7 +237,7 @@ public function testRestAndRepeatedWithRowPerChild()
237237
$html = $this->renderRest($view);
238238

239239
$this->assertMatchesXpath($html,
240-
'/div
240+
'/div
241241
[
242242
./label[@for="name_first"]
243243
/following-sibling::input[@type="text"][@id="name_first"]
@@ -267,7 +267,7 @@ public function testRestAndRepeatedWithWidgetPerChild()
267267
$html = $this->renderRest($view);
268268

269269
$this->assertMatchesXpath($html,
270-
'/div
270+
'/div
271271
[
272272
./label[@for="name_first"]
273273
/following-sibling::input[@type="text"][@id="name_first"]
@@ -288,7 +288,7 @@ public function testCollection()
288288
]);
289289

290290
$this->assertWidgetMatchesXpath($form->createView(), [],
291-
'/div
291+
'/div
292292
[
293293
./div[./input[@type="text"][@value="a"]]
294294
/following-sibling::div[./input[@type="text"][@value="b"]]
@@ -310,7 +310,7 @@ public function testCollectionWithAlternatingRowTypes()
310310
]);
311311

312312
$this->assertWidgetMatchesXpath($form->createView(), [],
313-
'/div
313+
'/div
314314
[
315315
./div[./div/div/input[@type="text"][@value="a"]]
316316
/following-sibling::div[./div/div/textarea[.="b"]]
@@ -328,7 +328,7 @@ public function testEmptyCollection()
328328
]);
329329

330330
$this->assertWidgetMatchesXpath($form->createView(), [],
331-
'/div
331+
'/div
332332
[./input[@type="hidden"][@id="names__token"]]
333333
[count(./div)=0]
334334
'
@@ -349,7 +349,7 @@ public function testCollectionRow()
349349
->getForm();
350350

351351
$this->assertWidgetMatchesXpath($form->createView(), [],
352-
'/div
352+
'/div
353353
[
354354
./div
355355
[
@@ -391,7 +391,7 @@ public function testForm()
391391
]);
392392

393393
$this->assertMatchesXpath($html,
394-
'/form
394+
'/form
395395
[
396396
./input[@type="hidden"][@name="_method"][@value="PUT"]
397397
/following-sibling::div
@@ -427,7 +427,7 @@ public function testFormWidget()
427427
->getForm();
428428

429429
$this->assertWidgetMatchesXpath($form->createView(), [],
430-
'/div
430+
'/div
431431
[
432432
./div
433433
[
@@ -459,7 +459,7 @@ public function testNestedFormError()
459459
$form->get('child')->addError(new FormError('[trans]Error![/trans]'));
460460

461461
$this->assertWidgetMatchesXpath($form->createView(), [],
462-
'/div
462+
'/div
463463
[
464464
./div/label
465465
/following-sibling::ul[./li[.="[trans]Error![/trans]"]]
@@ -484,7 +484,7 @@ public function testCsrf()
484484
->getForm();
485485

486486
$this->assertWidgetMatchesXpath($form->createView(), [],
487-
'/div
487+
'/div
488488
[
489489
./div
490490
/following-sibling::input[@type="hidden"][@id="name__token"][@value="foo&bar"]
@@ -501,7 +501,7 @@ public function testRepeated()
501501
]);
502502

503503
$this->assertWidgetMatchesXpath($form->createView(), [],
504-
'/div
504+
'/div
505505
[
506506
./div
507507
[
@@ -529,7 +529,7 @@ public function testRepeatedWithCustomOptions()
529529
]);
530530

531531
$this->assertWidgetMatchesXpath($form->createView(), [],
532-
'/div
532+
'/div
533533
[
534534
./div
535535
[
@@ -555,7 +555,7 @@ public function testSearchInputName()
555555
->getForm();
556556

557557
$this->assertWidgetMatchesXpath($form->createView(), [],
558-
'/div
558+
'/div
559559
[
560560
./div
561561
[
@@ -575,7 +575,7 @@ public function testLabelHasNoId()
575575
$html = $this->renderRow($form->createView());
576576

577577
$this->assertMatchesXpath($html,
578-
'/div
578+
'/div
579579
[
580580
./label[@for="name"][not(@id)]
581581
/following-sibling::input[@id="name"]
@@ -592,7 +592,7 @@ public function testLabelIsNotRenderedWhenSetToFalse()
592592
$html = $this->renderRow($form->createView());
593593

594594
$this->assertMatchesXpath($html,
595-
'/div
595+
'/div
596596
[
597597
./input[@id="name"]
598598
]
@@ -638,7 +638,7 @@ public function testThemeInheritance($parentTheme, $childTheme)
638638
$this->setTheme($view['child'], $childTheme);
639639

640640
$this->assertWidgetMatchesXpath($view, [],
641-
'/div
641+
'/div
642642
[
643643
./div
644644
[
@@ -674,7 +674,7 @@ public function testCollectionRowWithCustomBlock()
674674
->getForm();
675675

676676
$this->assertWidgetMatchesXpath($form->createView(), [],
677-
'/div
677+
'/div
678678
[
679679
./div[./label[.="Custom label: [trans]0[/trans]"]]
680680
/following-sibling::div[./label[.="Custom label: [trans]1[/trans]"]]
@@ -697,7 +697,7 @@ public function testChoiceRowWithCustomBlock()
697697
->getForm();
698698

699699
$this->assertWidgetMatchesXpath($form->createView(), [],
700-
'/div
700+
'/div
701701
[
702702
./label[.="Custom name label: [trans]ChoiceA[/trans]"]
703703
/following-sibling::label[.="Custom name label: [trans]ChoiceB[/trans]"]
@@ -793,7 +793,7 @@ public function testMultipleChoiceExpandedWithLabelsAsFalse()
793793
]);
794794

795795
$this->assertWidgetMatchesXpath($form->createView(), [],
796-
'/div
796+
'/div
797797
[
798798
./input[@type="checkbox"][@name="name[]"][@id="name_0"][@value="&a"][@checked]
799799
/following-sibling::input[@type="checkbox"][@name="name[]"][@id="name_1"][@value="&b"][not(@checked)]
@@ -821,7 +821,7 @@ public function testMultipleChoiceExpandedWithLabelsSetByCallable()
821821
]);
822822

823823
$this->assertWidgetMatchesXpath($form->createView(), [],
824-
'/div
824+
'/div
825825
[
826826
./input[@type="checkbox"][@name="name[]"][@id="name_0"][@value="&a"][@checked]
827827
/following-sibling::label[@for="name_0"][.="[trans]label.&a[/trans]"]
@@ -848,7 +848,7 @@ public function testMultipleChoiceExpandedWithLabelsSetFalseByCallable()
848848
]);
849849

850850
$this->assertWidgetMatchesXpath($form->createView(), [],
851-
'/div
851+
'/div
852852
[
853853
./input[@type="checkbox"][@name="name[]"][@id="name_0"][@value="&a"][@checked]
854854
/following-sibling::input[@type="checkbox"][@name="name[]"][@id="name_1"][@value="&b"][not(@checked)]
@@ -875,7 +875,7 @@ public function testFormEndWithRest()
875875

876876
// Insert the start tag, the end tag should be rendered by the helper
877877
$this->assertMatchesXpath('<form>'.$html,
878-
'/form
878+
'/form
879879
[
880880
./div
881881
[

0 commit comments

Comments
 (0)