Skip to content

Commit 28ff036

Browse files
committed
Remove obsolete PHP version checks
1 parent cf2632e commit 28ff036

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Tests/ConstraintValidatorTest.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ class ConstraintValidatorTest extends TestCase
2121
/**
2222
* @dataProvider formatValueProvider
2323
*/
24-
public function testFormatValue($expected, $value, $format = 0)
24+
public function testFormatValue(string $expected, mixed $value, int $format = 0)
2525
{
2626
\Locale::setDefault('en');
2727

2828
$this->assertSame($expected, (new TestFormatValueConstraintValidator())->formatValueProxy($value, $format));
2929
}
3030

31-
public static function formatValueProvider()
31+
public static function formatValueProvider(): array
3232
{
3333
$defaultTimezone = date_default_timezone_get();
3434
date_default_timezone_set('Europe/Moscow'); // GMT+3
@@ -47,12 +47,9 @@ public static function formatValueProvider()
4747
[class_exists(\IntlDateFormatter::class) ? 'Feb 2, 1971, 8:00 AM' : '1971-02-02 08:00:00', $dateTime, ConstraintValidator::PRETTY_DATE],
4848
[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],
4949
[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],
5051
];
5152

52-
if (\PHP_VERSION_ID >= 80100) {
53-
$data[] = ['FirstCase', TestEnum::FirstCase];
54-
}
55-
5653
date_default_timezone_set($defaultTimezone);
5754

5855
return $data;

0 commit comments

Comments
 (0)