Skip to content

Commit 4da3bac

Browse files
Merge branch '5.4' into 6.3
* 5.4: [Tests] Streamline [Validator] updated Romanian translation
2 parents e6743d1 + 7b8ea10 commit 4da3bac

19 files changed

+28
-32
lines changed

Tests/AbstractRequestHandlerTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function getNormalizedIniPostMaxSize(): string
6868
$this->request = null;
6969
}
7070

71-
public static function methodExceptGetProvider()
71+
public static function methodExceptGetProvider(): array
7272
{
7373
return [
7474
['POST'],
@@ -78,7 +78,7 @@ public static function methodExceptGetProvider()
7878
];
7979
}
8080

81-
public static function methodProvider()
81+
public static function methodProvider(): array
8282
{
8383
return array_merge([
8484
['GET'],

Tests/CompoundFormTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ public function testSubmitMapsSubmittedChildrenOntoEmptyData()
583583
$this->assertSame('Bernhard', $object['name']);
584584
}
585585

586-
public static function requestMethodProvider()
586+
public static function requestMethodProvider(): array
587587
{
588588
return [
589589
['POST'],

Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ protected function tearDown(): void
3636
$this->transformerWithNull = null;
3737
}
3838

39-
public static function transformProvider()
39+
public static function transformProvider(): array
4040
{
4141
return [
4242
// more extensive test set can be found in FormUtilTest

Tests/Extension/Core/DataTransformer/DateIntervalToStringTransformerTest.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,21 @@
2020
*/
2121
class DateIntervalToStringTransformerTest extends DateIntervalTestCase
2222
{
23-
public static function dataProviderISO()
23+
public static function dataProviderISO(): array
2424
{
25-
$data = [
25+
return [
2626
['P%YY%MM%DDT%HH%IM%SS', 'P00Y00M00DT00H00M00S', 'PT0S'],
2727
['P%yY%mM%dDT%hH%iM%sS', 'P0Y0M0DT0H0M0S', 'PT0S'],
2828
['P%yY%mM%dDT%hH%iM%sS', 'P10Y2M3DT16H5M6S', 'P10Y2M3DT16H5M6S'],
2929
['P%yY%mM%dDT%hH%iM', 'P10Y2M3DT16H5M', 'P10Y2M3DT16H5M'],
3030
['P%yY%mM%dDT%hH', 'P10Y2M3DT16H', 'P10Y2M3DT16H'],
3131
['P%yY%mM%dD', 'P10Y2M3D', 'P10Y2M3DT0H'],
3232
];
33-
34-
return $data;
3533
}
3634

37-
public static function dataProviderDate()
35+
public static function dataProviderDate(): array
3836
{
39-
$data = [
37+
return [
4038
[
4139
'%y years %m months %d days %h hours %i minutes %s seconds',
4240
'10 years 2 months 3 days 16 hours 5 minutes 6 seconds',
@@ -52,8 +50,6 @@ public static function dataProviderDate()
5250
['%y years %m months', '10 years 2 months', 'P10Y2M'],
5351
['%y year', '1 year', 'P1Y'],
5452
];
55-
56-
return $data;
5753
}
5854

5955
/**

Tests/Extension/Core/DataTransformer/DateTimeImmutableToDateTimeTransformerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function testTransform(\DateTime $expectedOutput, \DateTimeImmutable $inp
3030
$this->assertEquals($expectedOutput->getTimezone(), $actualOutput->getTimezone());
3131
}
3232

33-
public static function provider()
33+
public static function provider(): array
3434
{
3535
return [
3636
[

Tests/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class DateTimeToHtml5LocalDateTimeTransformerTest extends BaseDateTimeTransforme
2020
{
2121
use DateTimeEqualsTrait;
2222

23-
public static function transformProvider()
23+
public static function transformProvider(): array
2424
{
2525
return [
2626
['UTC', 'UTC', '2010-02-03 04:05:06 UTC', '2010-02-03T04:05:06', true],
@@ -36,7 +36,7 @@ public static function transformProvider()
3636
];
3737
}
3838

39-
public static function reverseTransformProvider()
39+
public static function reverseTransformProvider(): array
4040
{
4141
return [
4242
// format without seconds, as appears in some browsers

Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ protected function tearDown(): void
3737
$this->dateTimeWithoutSeconds = null;
3838
}
3939

40-
public static function allProvider()
40+
public static function allProvider(): array
4141
{
4242
return [
4343
['UTC', 'UTC', '2010-02-03 04:05:06 UTC', '2010-02-03T04:05:06Z'],

Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function testReverseTransform()
8787
$this->assertEquals(2, $transformer->reverseTransform('200'));
8888
}
8989

90-
public static function reverseTransformWithRoundingProvider()
90+
public static function reverseTransformWithRoundingProvider(): array
9191
{
9292
return [
9393
// towards positive infinity (1.6 -> 2, -1.6 -> -1)

Tests/Extension/Core/Type/CheckboxTypeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public function testCustomModelTransformer($data, $checked)
162162
$this->assertEquals($checked, $view->vars['checked']);
163163
}
164164

165-
public static function provideCustomModelTransformerData()
165+
public static function provideCustomModelTransformerData(): array
166166
{
167167
return [
168168
['checked', true],
@@ -182,7 +182,7 @@ public function testCustomFalseValues($falseValue)
182182
$this->assertFalse($form->getData());
183183
}
184184

185-
public static function provideCustomFalseValues()
185+
public static function provideCustomFalseValues(): array
186186
{
187187
return [
188188
[''],

Tests/Extension/Core/Type/ColorTypeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function testValidationShouldPass(bool $html5, ?string $submittedValue)
3333
$this->assertEmpty($form->getErrors());
3434
}
3535

36-
public static function validationShouldPassProvider()
36+
public static function validationShouldPassProvider(): array
3737
{
3838
return [
3939
[false, 'foo'],
@@ -71,7 +71,7 @@ public function testValidationShouldFail(string $expectedValueParameterValue, ?s
7171
$this->assertEquals([$expectedFormError], iterator_to_array($form->getErrors()));
7272
}
7373

74-
public static function validationShouldFailProvider()
74+
public static function validationShouldFailProvider(): array
7575
{
7676
return [
7777
['foo', 'foo'],

0 commit comments

Comments
 (0)