@@ -80,7 +80,7 @@ do so, create a :doc:`controller class </controller>` like the following:
80
80
/**
81
81
* @Route("/blog", name="blog_list")
82
82
*/
83
- public function list()
83
+ public function list(): Response
84
84
{
85
85
// ...
86
86
}
@@ -97,7 +97,7 @@ do so, create a :doc:`controller class </controller>` like the following:
97
97
class BlogController extends AbstractController
98
98
{
99
99
#[Route('/blog', name: 'blog_list')]
100
- public function list()
100
+ public function list(): Response
101
101
{
102
102
// ...
103
103
}
@@ -1045,7 +1045,7 @@ optional ``priority`` parameter in those routes to control their priority:
1045
1045
*
1046
1046
* @Route("/blog/{slug}", name="blog_show")
1047
1047
*/
1048
- public function show(string $slug)
1048
+ public function show(string $slug): Response
1049
1049
{
1050
1050
// ...
1051
1051
}
@@ -1055,7 +1055,7 @@ optional ``priority`` parameter in those routes to control their priority:
1055
1055
*
1056
1056
* @Route("/blog/list", name="blog_list", priority=2)
1057
1057
*/
1058
- public function list()
1058
+ public function list(): Response
1059
1059
{
1060
1060
// ...
1061
1061
}
@@ -1075,7 +1075,7 @@ optional ``priority`` parameter in those routes to control their priority:
1075
1075
* This route has a greedy pattern and is defined first.
1076
1076
*/
1077
1077
#[Route('/blog/{slug}', name: 'blog_show')]
1078
- public function show(string $slug)
1078
+ public function show(string $slug): Response
1079
1079
{
1080
1080
// ...
1081
1081
}
@@ -1084,7 +1084,7 @@ optional ``priority`` parameter in those routes to control their priority:
1084
1084
* This route could not be matched without defining a higher priority than 0.
1085
1085
*/
1086
1086
#[Route('/blog/list', name: 'blog_list', priority: 2)]
1087
- public function list()
1087
+ public function list(): Response
1088
1088
{
1089
1089
// ...
1090
1090
}
@@ -2493,7 +2493,7 @@ session shouldn't be used when matching a request:
2493
2493
/**
2494
2494
* @Route("/", name="homepage", stateless=true)
2495
2495
*/
2496
- public function homepage()
2496
+ public function homepage(): Response
2497
2497
{
2498
2498
// ...
2499
2499
}
@@ -2510,7 +2510,7 @@ session shouldn't be used when matching a request:
2510
2510
class MainController extends AbstractController
2511
2511
{
2512
2512
#[Route('/', name: 'homepage', stateless: true)]
2513
- public function homepage()
2513
+ public function homepage(): Response
2514
2514
{
2515
2515
// ...
2516
2516
}
0 commit comments