@@ -51,8 +51,8 @@ class BlogController extends AbstractController
51
51
* could move this annotation to any other controller while maintaining
52
52
* the route name and therefore, without breaking any existing link.
53
53
*
54
- * @Route("/", methods={ "GET"} , name="admin_index")
55
- * @Route("/", methods={ "GET"} , name="admin_post_index")
54
+ * @Route("/", methods="GET", name="admin_index")
55
+ * @Route("/", methods="GET", name="admin_post_index")
56
56
*/
57
57
public function index (PostRepository $ posts ): Response
58
58
{
@@ -64,7 +64,7 @@ public function index(PostRepository $posts): Response
64
64
/**
65
65
* Creates a new Post entity.
66
66
*
67
- * @Route("/new", methods={ "GET", " POST"} , name="admin_post_new")
67
+ * @Route("/new", methods="GET| POST", name="admin_post_new")
68
68
*
69
69
* NOTE: the Method annotation is optional, but it's a recommended practice
70
70
* to constraint the HTTP methods each controller responds to (by default
@@ -114,7 +114,7 @@ public function new(Request $request, SluggerInterface $slugger): Response
114
114
/**
115
115
* Finds and displays a Post entity.
116
116
*
117
- * @Route("/{id<\d+>}", methods={ "GET"} , name="admin_post_show")
117
+ * @Route("/{id<\d+>}", methods="GET", name="admin_post_show")
118
118
*/
119
119
public function show (Post $ post ): Response
120
120
{
@@ -130,7 +130,7 @@ public function show(Post $post): Response
130
130
/**
131
131
* Displays a form to edit an existing Post entity.
132
132
*
133
- * @Route("/{id<\d+>}/edit",methods={ "GET", " POST"} , name="admin_post_edit")
133
+ * @Route("/{id<\d+>}/edit", methods="GET| POST", name="admin_post_edit")
134
134
* @IsGranted("edit", subject="post", message="Posts can only be edited by their authors.")
135
135
*/
136
136
public function edit (Request $ request , Post $ post , SluggerInterface $ slugger ): Response
@@ -156,7 +156,7 @@ public function edit(Request $request, Post $post, SluggerInterface $slugger): R
156
156
/**
157
157
* Deletes a Post entity.
158
158
*
159
- * @Route("/{id}/delete", methods={ "POST"} , name="admin_post_delete")
159
+ * @Route("/{id}/delete", methods="POST", name="admin_post_delete")
160
160
* @IsGranted("delete", subject="post")
161
161
*/
162
162
public function delete (Request $ request , Post $ post ): Response
0 commit comments