3131 *
3232 * @author Thibault Duplessis <thibault.duplessis@gmail.com>
3333 * @author Christophe Coevoet <stof@notk.org>
34+ *
35+ * @final
3436 */
3537class GroupController extends Controller
3638{
@@ -50,9 +52,9 @@ public function __construct(EventDispatcherInterface $eventDispatcher, FactoryIn
5052 */
5153 public function listAction ()
5254 {
53- return $ this ->render ('@FOSUser/Group/list.html.twig ' , array (
55+ return $ this ->render ('@FOSUser/Group/list.html.twig ' , [
5456 'groups ' => $ this ->groupManager ->findGroups (),
55- ) );
57+ ] );
5658 }
5759
5860 /**
@@ -64,16 +66,15 @@ public function listAction()
6466 */
6567 public function showAction ($ groupName )
6668 {
67- return $ this ->render ('@FOSUser/Group/show.html.twig ' , array (
69+ return $ this ->render ('@FOSUser/Group/show.html.twig ' , [
6870 'group ' => $ this ->findGroupBy ('name ' , $ groupName ),
69- ) );
71+ ] );
7072 }
7173
7274 /**
7375 * Edit one group, show the edit form.
7476 *
75- * @param Request $request
76- * @param string $groupName
77+ * @param string $groupName
7778 *
7879 * @return Response
7980 */
@@ -100,7 +101,7 @@ public function editAction(Request $request, $groupName)
100101 $ this ->groupManager ->updateGroup ($ group );
101102
102103 if (null === $ response = $ event ->getResponse ()) {
103- $ url = $ this ->generateUrl ('fos_user_group_show ' , array ( 'groupName ' => $ group ->getName ()) );
104+ $ url = $ this ->generateUrl ('fos_user_group_show ' , [ 'groupName ' => $ group ->getName ()] );
104105 $ response = new RedirectResponse ($ url );
105106 }
106107
@@ -109,17 +110,15 @@ public function editAction(Request $request, $groupName)
109110 return $ response ;
110111 }
111112
112- return $ this ->render ('@FOSUser/Group/edit.html.twig ' , array (
113+ return $ this ->render ('@FOSUser/Group/edit.html.twig ' , [
113114 'form ' => $ form ->createView (),
114115 'group_name ' => $ group ->getName (),
115- ) );
116+ ] );
116117 }
117118
118119 /**
119120 * Show the new form.
120121 *
121- * @param Request $request
122- *
123122 * @return Response
124123 */
125124 public function newAction (Request $ request )
@@ -140,7 +139,7 @@ public function newAction(Request $request)
140139 $ this ->groupManager ->updateGroup ($ group );
141140
142141 if (null === $ response = $ event ->getResponse ()) {
143- $ url = $ this ->generateUrl ('fos_user_group_show ' , array ( 'groupName ' => $ group ->getName ()) );
142+ $ url = $ this ->generateUrl ('fos_user_group_show ' , [ 'groupName ' => $ group ->getName ()] );
144143 $ response = new RedirectResponse ($ url );
145144 }
146145
@@ -149,16 +148,15 @@ public function newAction(Request $request)
149148 return $ response ;
150149 }
151150
152- return $ this ->render ('@FOSUser/Group/new.html.twig ' , array (
151+ return $ this ->render ('@FOSUser/Group/new.html.twig ' , [
153152 'form ' => $ form ->createView (),
154- ) );
153+ ] );
155154 }
156155
157156 /**
158157 * Delete one group.
159158 *
160- * @param Request $request
161- * @param string $groupName
159+ * @param string $groupName
162160 *
163161 * @return RedirectResponse
164162 */
0 commit comments