From b48ee36f28afc9333465871c6c2b9793208cc869 Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Mon, 7 Feb 2022 09:52:39 +0100 Subject: [PATCH 1/2] restricted some interfaces too much --- src/RedirectRouteInterface.php | 6 +++--- src/RouteProviderInterface.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/RedirectRouteInterface.php b/src/RedirectRouteInterface.php index 12181c3..b4eba95 100644 --- a/src/RedirectRouteInterface.php +++ b/src/RedirectRouteInterface.php @@ -45,9 +45,9 @@ interface RedirectRouteInterface extends RouteObjectInterface * * If this is non-empty, the other methods won't be used. * - * @return string target absolute uri + * @return string|null target absolute uri */ - public function getUri(): string; + public function getUri(): ?string; /** * Get the target route document this route redirects to. @@ -62,7 +62,7 @@ public function getRouteTarget(): ?SymfonyRoute; * Get the name of the target route for working with the symfony standard * router. */ - public function getRouteName(): string; + public function getRouteName(): ?string; /** * Whether this should be a permanent or temporary redirect. diff --git a/src/RouteProviderInterface.php b/src/RouteProviderInterface.php index 8e34406..2c15adb 100644 --- a/src/RouteProviderInterface.php +++ b/src/RouteProviderInterface.php @@ -79,5 +79,5 @@ public function getRouteByName(string $name): SymfonyRoute; * * @return SymfonyRoute[] Iterable list with the keys being the names from the $names array */ - public function getRoutesByNames(?array $names): array; + public function getRoutesByNames(?array $names = null): iterable; } From 9724a91f030f0e60d91a1202ce0e026347a41314 Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Mon, 7 Feb 2022 09:53:51 +0100 Subject: [PATCH 2/2] fix cs --- tests/Unit/Routing/DynamicRouterTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/Unit/Routing/DynamicRouterTest.php b/tests/Unit/Routing/DynamicRouterTest.php index 08ca2a6..6ceb826 100644 --- a/tests/Unit/Routing/DynamicRouterTest.php +++ b/tests/Unit/Routing/DynamicRouterTest.php @@ -32,7 +32,6 @@ class DynamicRouterTest extends TestCase { - /** * @var UrlMatcherInterface&MockObject */