From 2cee7f2b174be874b9debc4b06e070b8bd973cdc Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 26 Aug 2019 18:50:55 +0200 Subject: [PATCH] fix merge --- .../Storage/Handler/PredisClusterSessionHandlerTest.php | 5 ++++- .../Session/Storage/Handler/PredisSessionHandlerTest.php | 5 ++++- .../Component/Intl/Tests/Collator/AbstractCollatorTest.php | 2 +- .../Tests/DateFormatter/AbstractIntlDateFormatterTest.php | 2 +- .../Intl/Tests/DateFormatter/IntlDateFormatterTest.php | 2 +- .../DateFormatter/Verification/IntlDateFormatterTest.php | 2 +- .../Tests/NumberFormatter/AbstractNumberFormatterTest.php | 2 +- src/Symfony/Component/Lock/Tests/Store/PredisStoreTest.php | 3 +++ .../Component/Routing/Tests/Loader/ObjectLoaderTest.php | 2 +- 9 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php index 622b42da1a..4d59bfc30c 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php @@ -15,7 +15,10 @@ use Predis\Client; class PredisClusterSessionHandlerTest extends AbstractRedisSessionHandlerTestCase { - protected function createRedisClient(string $host): Client + /** + * @return Client + */ + protected function createRedisClient(string $host): object { return new Client([['host' => $host]]); } diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisSessionHandlerTest.php index 5ecab116f7..1c9f0ec784 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisSessionHandlerTest.php @@ -15,7 +15,10 @@ use Predis\Client; class PredisSessionHandlerTest extends AbstractRedisSessionHandlerTestCase { - protected function createRedisClient(string $host): Client + /** + * @return Client + */ + protected function createRedisClient(string $host): object { return new Client(['host' => $host]); } diff --git a/src/Symfony/Component/Intl/Tests/Collator/AbstractCollatorTest.php b/src/Symfony/Component/Intl/Tests/Collator/AbstractCollatorTest.php index fcc643cdf2..b2931f65e1 100644 --- a/src/Symfony/Component/Intl/Tests/Collator/AbstractCollatorTest.php +++ b/src/Symfony/Component/Intl/Tests/Collator/AbstractCollatorTest.php @@ -56,5 +56,5 @@ abstract class AbstractCollatorTest extends TestCase /** * @return Collator|\Collator */ - abstract protected function getCollator(string $locale): object; + abstract protected function getCollator(string $locale); } diff --git a/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php b/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php index 9c833f26ac..cee6b548a2 100644 --- a/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php +++ b/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php @@ -963,7 +963,7 @@ abstract class AbstractIntlDateFormatterTest extends TestCase /** * @return IntlDateFormatter|\IntlDateFormatter */ - abstract protected function getDateFormatter($locale, $datetype, $timetype, $timezone = null, $calendar = IntlDateFormatter::GREGORIAN, $pattern = null): object; + abstract protected function getDateFormatter($locale, $datetype, $timetype, $timezone = null, $calendar = IntlDateFormatter::GREGORIAN, $pattern = null); abstract protected function getIntlErrorMessage(): string; diff --git a/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php b/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php index e1d7a55bae..10f95c013b 100644 --- a/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php +++ b/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php @@ -177,7 +177,7 @@ class IntlDateFormatterTest extends AbstractIntlDateFormatterTest $this->assertIsIntlSuccess($formatter, 'U_ZERO_ERROR', IntlGlobals::U_ZERO_ERROR); } - protected function getDateFormatter($locale, $datetype, $timetype, $timezone = null, $calendar = IntlDateFormatter::GREGORIAN, $pattern = null): object + protected function getDateFormatter($locale, $datetype, $timetype, $timezone = null, $calendar = IntlDateFormatter::GREGORIAN, $pattern = null) { return new class($locale, $datetype, $timetype, $timezone, $calendar, $pattern) extends IntlDateFormatter { }; diff --git a/src/Symfony/Component/Intl/Tests/DateFormatter/Verification/IntlDateFormatterTest.php b/src/Symfony/Component/Intl/Tests/DateFormatter/Verification/IntlDateFormatterTest.php index 5ccc609a5f..50cccd993b 100644 --- a/src/Symfony/Component/Intl/Tests/DateFormatter/Verification/IntlDateFormatterTest.php +++ b/src/Symfony/Component/Intl/Tests/DateFormatter/Verification/IntlDateFormatterTest.php @@ -57,7 +57,7 @@ class IntlDateFormatterTest extends AbstractIntlDateFormatterTest parent::testDateAndTimeType($timestamp, $datetype, $timetype, $expected); } - protected function getDateFormatter($locale, $datetype, $timetype, $timezone = null, $calendar = IntlDateFormatter::GREGORIAN, $pattern = null): object + protected function getDateFormatter($locale, $datetype, $timetype, $timezone = null, $calendar = IntlDateFormatter::GREGORIAN, $pattern = null) { IntlTestHelper::requireFullIntl($this, '55.1'); diff --git a/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php b/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php index d9f1192d84..9d83e793ed 100644 --- a/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php +++ b/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php @@ -836,7 +836,7 @@ abstract class AbstractNumberFormatterTest extends TestCase /** * @return NumberFormatter|\NumberFormatter */ - abstract protected function getNumberFormatter(string $locale = 'en', string $style = null, string $pattern = null): object; + abstract protected function getNumberFormatter(string $locale = 'en', string $style = null, string $pattern = null); abstract protected function getIntlErrorMessage(): string; diff --git a/src/Symfony/Component/Lock/Tests/Store/PredisStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/PredisStoreTest.php index 79e2a914f4..97b4b23c65 100644 --- a/src/Symfony/Component/Lock/Tests/Store/PredisStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/PredisStoreTest.php @@ -26,6 +26,9 @@ class PredisStoreTest extends AbstractRedisStoreTest } } + /** + * @return \Predis\Client + */ protected function getRedisConnection(): object { $redis = new \Predis\Client('tcp://'.getenv('REDIS_HOST').':6379'); diff --git a/src/Symfony/Component/Routing/Tests/Loader/ObjectLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/ObjectLoaderTest.php index b00225f2f1..f3ece536e9 100644 --- a/src/Symfony/Component/Routing/Tests/Loader/ObjectLoaderTest.php +++ b/src/Symfony/Component/Routing/Tests/Loader/ObjectLoaderTest.php @@ -106,7 +106,7 @@ class TestObjectLoader extends ObjectLoader return 'service'; } - protected function getObject(string $id): object + protected function getObject(string $id) { return $this->loaderMap[$id] ?? null; }