Skip to content

Commit 23450fc

Browse files
committed
minor #17168 [Routing] add missing actions return hints (mohamedGasmii)
This PR was merged into the 5.4 branch. Discussion ---------- [Routing] add missing actions return hints Add missing return hints <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `6.x` for features of unreleased versions). --> Commits ------- 98f9219 [Routing] add missing action return hints
2 parents 4fefe94 + 98f9219 commit 23450fc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

routing.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ do so, create a :doc:`controller class </controller>` like the following:
8080
/**
8181
* @Route("/blog", name="blog_list")
8282
*/
83-
public function list()
83+
public function list(): Response
8484
{
8585
// ...
8686
}
@@ -97,7 +97,7 @@ do so, create a :doc:`controller class </controller>` like the following:
9797
class BlogController extends AbstractController
9898
{
9999
#[Route('/blog', name: 'blog_list')]
100-
public function list()
100+
public function list(): Response
101101
{
102102
// ...
103103
}
@@ -1045,7 +1045,7 @@ optional ``priority`` parameter in those routes to control their priority:
10451045
*
10461046
* @Route("/blog/{slug}", name="blog_show")
10471047
*/
1048-
public function show(string $slug)
1048+
public function show(string $slug): Response
10491049
{
10501050
// ...
10511051
}
@@ -1055,7 +1055,7 @@ optional ``priority`` parameter in those routes to control their priority:
10551055
*
10561056
* @Route("/blog/list", name="blog_list", priority=2)
10571057
*/
1058-
public function list()
1058+
public function list(): Response
10591059
{
10601060
// ...
10611061
}
@@ -1075,7 +1075,7 @@ optional ``priority`` parameter in those routes to control their priority:
10751075
* This route has a greedy pattern and is defined first.
10761076
*/
10771077
#[Route('/blog/{slug}', name: 'blog_show')]
1078-
public function show(string $slug)
1078+
public function show(string $slug): Response
10791079
{
10801080
// ...
10811081
}
@@ -1084,7 +1084,7 @@ optional ``priority`` parameter in those routes to control their priority:
10841084
* This route could not be matched without defining a higher priority than 0.
10851085
*/
10861086
#[Route('/blog/list', name: 'blog_list', priority: 2)]
1087-
public function list()
1087+
public function list(): Response
10881088
{
10891089
// ...
10901090
}
@@ -2493,7 +2493,7 @@ session shouldn't be used when matching a request:
24932493
/**
24942494
* @Route("/", name="homepage", stateless=true)
24952495
*/
2496-
public function homepage()
2496+
public function homepage(): Response
24972497
{
24982498
// ...
24992499
}
@@ -2510,7 +2510,7 @@ session shouldn't be used when matching a request:
25102510
class MainController extends AbstractController
25112511
{
25122512
#[Route('/', name: 'homepage', stateless: true)]
2513-
public function homepage()
2513+
public function homepage(): Response
25142514
{
25152515
// ...
25162516
}

0 commit comments

Comments
 (0)