1 | <?php |
||
19 | class BlogController extends Controller |
||
20 | { |
||
21 | |||
22 | //ToDo: fix page over limit |
||
23 | /** |
||
24 | * @param $page |
||
25 | * @Method("GET") |
||
26 | * @Route("/{pager}/{page}", name="homepage", |
||
27 | * defaults={"pager": "page", "page": 1}, |
||
28 | * requirements={ |
||
29 | * "pager": "page", |
||
30 | * "page": "[1-9]\d*", |
||
31 | * }) |
||
32 | * @Template("AppBundle:blog:blogPosts.html.twig") |
||
33 | * |
||
34 | * @return Response |
||
35 | */ |
||
36 | 1 | public function indexAction($page = 1) |
|
46 | |||
47 | /** |
||
48 | * @param $slug |
||
49 | * @Method("GET") |
||
50 | * @Route("/article/{slug}", name="showArticle") |
||
51 | * @Template("AppBundle:blog:blogSingle.html.twig") |
||
52 | * |
||
53 | * @return Response |
||
54 | */ |
||
55 | 1 | public function showAction($slug) |
|
65 | |||
66 | //ToDo: fix page over limit |
||
67 | //ToDo: fix error 500 when sorting with undefined params and page 0 |
||
68 | /** |
||
69 | * @param $sortBy |
||
70 | * @param $param |
||
71 | * @param $page |
||
72 | * @Method("GET") |
||
73 | * @Route("/{sortBy}/{param}/{pager}/{page}", name="sortArticles", |
||
74 | * defaults={"pager": "page", "page": 1}, |
||
75 | * requirements={ |
||
76 | * "sortBy": "category|tag|author|date", |
||
77 | * "pager": "page", |
||
78 | * "page": "[1-9]\d*", |
||
79 | * }) |
||
80 | * @Template("AppBundle:blog:blogPosts.html.twig") |
||
81 | * |
||
82 | * @return Response |
||
83 | */ |
||
84 | 3 | public function sortAction($sortBy, $param, $page = 1) |
|
107 | |||
108 | /** |
||
109 | * @param Request $request |
||
110 | * @param $slug |
||
111 | * @Route("/newCommentFor/{slug}", name="commentForm") |
||
112 | * @Template("AppBundle:blog:commentForm.html.twig") |
||
113 | * |
||
114 | * @return array|\Symfony\Component\HttpFoundation\RedirectResponse |
||
115 | */ |
||
116 | 2 | public function newCommentAction(Request $request, $slug) |
|
169 | |||
170 | /** |
||
171 | * @param $slug |
||
172 | * @param $page |
||
173 | * @Route("/comments/{slug}/{pager}/{page}", name="articleComments", |
||
174 | * defaults={"pager": "page", "page": 1}, |
||
175 | * requirements={ |
||
176 | * "pager": "page", |
||
177 | * "page": "[1-9]\d*", |
||
178 | * }) |
||
179 | * @Template("AppBundle:blog:comments.html.twig") |
||
180 | * |
||
181 | * @return Response |
||
182 | */ |
||
183 | 2 | public function showArticleCommentsAction($slug, $page = 1) |
|
193 | |||
194 | /** |
||
195 | * @Route("/success", name="success") |
||
196 | * @Template("AppBundle:blog:success.html.twig") |
||
197 | * |
||
198 | * @return Response |
||
199 | */ |
||
200 | 1 | public function successAction() |
|
204 | } |
||
205 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.