Skip to content

Commit 2b4a343

Browse files
Add more "object" return types
1 parent d4aebdf commit 2b4a343

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

Tests/Collator/AbstractCollatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,5 @@ public function asortProvider()
5656
/**
5757
* @return Collator|\Collator
5858
*/
59-
abstract protected function getCollator(string $locale);
59+
abstract protected function getCollator(string $locale): object;
6060
}

Tests/DateFormatter/AbstractIntlDateFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ protected function assertIsIntlSuccess($formatter, $errorMessage, $errorCode)
963963
/**
964964
* @return IntlDateFormatter|\IntlDateFormatter
965965
*/
966-
abstract protected function getDateFormatter($locale, $datetype, $timetype, $timezone = null, $calendar = IntlDateFormatter::GREGORIAN, $pattern = null);
966+
abstract protected function getDateFormatter($locale, $datetype, $timetype, $timezone = null, $calendar = IntlDateFormatter::GREGORIAN, $pattern = null): object;
967967

968968
abstract protected function getIntlErrorMessage(): string;
969969

Tests/DateFormatter/IntlDateFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public function testParseThreeDigitsYears()
177177
$this->assertIsIntlSuccess($formatter, 'U_ZERO_ERROR', IntlGlobals::U_ZERO_ERROR);
178178
}
179179

180-
protected function getDateFormatter($locale, $datetype, $timetype, $timezone = null, $calendar = IntlDateFormatter::GREGORIAN, $pattern = null)
180+
protected function getDateFormatter($locale, $datetype, $timetype, $timezone = null, $calendar = IntlDateFormatter::GREGORIAN, $pattern = null): object
181181
{
182182
return new class($locale, $datetype, $timetype, $timezone, $calendar, $pattern) extends IntlDateFormatter {
183183
};

Tests/DateFormatter/Verification/IntlDateFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function testDateAndTimeType($timestamp, $datetype, $timetype, $expected)
5757
parent::testDateAndTimeType($timestamp, $datetype, $timetype, $expected);
5858
}
5959

60-
protected function getDateFormatter($locale, $datetype, $timetype, $timezone = null, $calendar = IntlDateFormatter::GREGORIAN, $pattern = null)
60+
protected function getDateFormatter($locale, $datetype, $timetype, $timezone = null, $calendar = IntlDateFormatter::GREGORIAN, $pattern = null): object
6161
{
6262
IntlTestHelper::requireFullIntl($this, '55.1');
6363

Tests/NumberFormatter/AbstractNumberFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ public function testParseWithNotNullPositionValue()
836836
/**
837837
* @return NumberFormatter|\NumberFormatter
838838
*/
839-
abstract protected function getNumberFormatter(string $locale = 'en', string $style = null, string $pattern = null);
839+
abstract protected function getNumberFormatter(string $locale = 'en', string $style = null, string $pattern = null): object;
840840

841841
abstract protected function getIntlErrorMessage(): string;
842842

0 commit comments

Comments
 (0)