@@ -21,14 +21,14 @@ class ConstraintValidatorTest extends TestCase
21
21
/**
22
22
* @dataProvider formatValueProvider
23
23
*/
24
- public function testFormatValue ($ expected , $ value , $ format = 0 )
24
+ public function testFormatValue (string $ expected , mixed $ value , int $ format = 0 )
25
25
{
26
26
\Locale::setDefault ('en ' );
27
27
28
28
$ this ->assertSame ($ expected , (new TestFormatValueConstraintValidator ())->formatValueProxy ($ value , $ format ));
29
29
}
30
30
31
- public static function formatValueProvider ()
31
+ public static function formatValueProvider (): array
32
32
{
33
33
$ defaultTimezone = date_default_timezone_get ();
34
34
date_default_timezone_set ('Europe/Moscow ' ); // GMT+3
@@ -47,12 +47,9 @@ public static function formatValueProvider()
47
47
[class_exists (\IntlDateFormatter::class) ? 'Feb 2, 1971, 8:00 AM ' : '1971-02-02 08:00:00 ' , $ dateTime , ConstraintValidator::PRETTY_DATE ],
48
48
[class_exists (\IntlDateFormatter::class) ? 'Jan 1, 1970, 6:00 AM ' : '1970-01-01 06:00:00 ' , new \DateTimeImmutable ('1970-01-01T06:00:00Z ' ), ConstraintValidator::PRETTY_DATE ],
49
49
[class_exists (\IntlDateFormatter::class) ? 'Jan 1, 1970, 3:00 PM ' : '1970-01-01 15:00:00 ' , (new \DateTimeImmutable ('1970-01-01T23:00:00 ' ))->setTimezone (new \DateTimeZone ('America/New_York ' )), ConstraintValidator::PRETTY_DATE ],
50
+ ['FirstCase ' , TestEnum::FirstCase],
50
51
];
51
52
52
- if (\PHP_VERSION_ID >= 80100 ) {
53
- $ data [] = ['FirstCase ' , TestEnum::FirstCase];
54
- }
55
-
56
53
date_default_timezone_set ($ defaultTimezone );
57
54
58
55
return $ data ;
0 commit comments