11<?php
22
3+ /*
4+ * This file is part of HackzillaTicketBundle package.
5+ *
6+ * (c) Daniel Platt <[email protected] > 7+ *
8+ * For the full copyright and license information, please view the LICENSE
9+ * file that was distributed with this source code.
10+ */
11+
312namespace Hackzilla \Bundle \TicketBundle \Controller ;
413
514use Hackzilla \Bundle \TicketBundle \Event \TicketEvent ;
@@ -27,12 +36,12 @@ class TicketController extends Controller
2736 */
2837 public function indexAction (Request $ request )
2938 {
30- $ userManager = $ this ->getUserManager ();
39+ $ userManager = $ this ->getUserManager ();
3140 $ ticketManager = $ this ->get ('hackzilla_ticket.ticket_manager ' );
3241
3342 $ translationDomain = $ this ->getParameter ('hackzilla_ticket.translation_domain ' );
3443
35- $ ticketState = $ request ->get ('state ' , $ this ->get ('translator ' )->trans ('STATUS_OPEN ' , [], $ translationDomain ));
44+ $ ticketState = $ request ->get ('state ' , $ this ->get ('translator ' )->trans ('STATUS_OPEN ' , [], $ translationDomain ));
3645 $ ticketPriority = $ request ->get ('priority ' , null );
3746
3847 $ query = $ ticketManager ->getTicketListQuery (
@@ -50,9 +59,9 @@ public function indexAction(Request $request)
5059 return $ this ->render (
5160 $ this ->container ->getParameter ('hackzilla_ticket.templates ' )['index ' ],
5261 [
53- 'pagination ' => $ pagination ,
54- 'ticketState ' => $ ticketState ,
55- 'ticketPriority ' => $ ticketPriority ,
62+ 'pagination ' => $ pagination ,
63+ 'ticketState ' => $ ticketState ,
64+ 'ticketPriority ' => $ ticketPriority ,
5665 'translationDomain ' => $ translationDomain ,
5766 ]
5867 );
@@ -68,7 +77,7 @@ public function createAction(Request $request)
6877 $ ticketManager = $ this ->get ('hackzilla_ticket.ticket_manager ' );
6978
7079 $ ticket = $ ticketManager ->createTicket ();
71- $ form = $ this ->createForm (TicketType::class, $ ticket );
80+ $ form = $ this ->createForm (TicketType::class, $ ticket );
7281 $ form ->handleRequest ($ request );
7382
7483 if ($ form ->isValid ()) {
@@ -87,8 +96,8 @@ public function createAction(Request $request)
8796 return $ this ->render (
8897 $ this ->container ->getParameter ('hackzilla_ticket.templates ' )['new ' ],
8998 [
90- 'entity ' => $ ticket ,
91- 'form ' => $ form ->createView (),
99+ 'entity ' => $ ticket ,
100+ 'form ' => $ form ->createView (),
92101 'translationDomain ' => $ translationDomain ,
93102 ]
94103 );
@@ -100,7 +109,7 @@ public function createAction(Request $request)
100109 public function newAction ()
101110 {
102111 $ ticketManager = $ this ->get ('hackzilla_ticket.ticket_manager ' );
103- $ entity = $ ticketManager ->createTicket ();
112+ $ entity = $ ticketManager ->createTicket ();
104113
105114 $ form = $ this ->createForm (TicketType::class, $ entity );
106115
@@ -109,8 +118,8 @@ public function newAction()
109118 return $ this ->render (
110119 $ this ->container ->getParameter ('hackzilla_ticket.templates ' )['new ' ],
111120 [
112- 'entity ' => $ entity ,
113- 'form ' => $ form ->createView (),
121+ 'entity ' => $ entity ,
122+ 'form ' => $ form ->createView (),
114123 'translationDomain ' => $ translationDomain ,
115124 ]
116125 );
@@ -126,7 +135,7 @@ public function newAction()
126135 public function showAction ($ ticketId )
127136 {
128137 $ ticketManager = $ this ->get ('hackzilla_ticket.ticket_manager ' );
129- $ ticket = $ ticketManager ->getTicketById ($ ticketId );
138+ $ ticket = $ ticketManager ->getTicketById ($ ticketId );
130139
131140 if (!$ ticket ) {
132141 return $ this ->redirect ($ this ->generateUrl ('hackzilla_ticket ' ));
@@ -162,7 +171,7 @@ public function showAction($ticketId)
162171 public function replyAction (Request $ request , $ ticketId )
163172 {
164173 $ ticketManager = $ this ->get ('hackzilla_ticket.ticket_manager ' );
165- $ ticket = $ ticketManager ->getTicketById ($ ticketId );
174+ $ ticket = $ ticketManager ->getTicketById ($ ticketId );
166175
167176 $ translationDomain = $ this ->getParameter ('hackzilla_ticket.translation_domain ' );
168177
@@ -205,7 +214,7 @@ public function replyAction(Request $request, $ticketId)
205214 public function deleteAction (Request $ request , $ ticketId )
206215 {
207216 $ userManager = $ this ->getUserManager ();
208- $ user = $ userManager ->getCurrentUser ();
217+ $ user = $ userManager ->getCurrentUser ();
209218
210219 if (!\is_object ($ user ) || !$ userManager ->hasRole ($ user , TicketRole::ADMIN )) {
211220 throw new \Symfony \Component \HttpKernel \Exception \HttpException (403 );
@@ -218,7 +227,7 @@ public function deleteAction(Request $request, $ticketId)
218227
219228 if ($ form ->isValid ()) {
220229 $ ticketManager = $ this ->get ('hackzilla_ticket.ticket_manager ' );
221- $ ticket = $ ticketManager ->getTicketById ($ ticketId );
230+ $ ticket = $ ticketManager ->getTicketById ($ ticketId );
222231
223232 if (!$ ticket ) {
224233 $ translationDomain = $ this ->getParameter ('hackzilla_ticket.translation_domain ' );
0 commit comments