@@ -100,13 +100,7 @@ public function createMessage(TicketInterface $ticket = null)
100100 }
101101
102102 /**
103- * Update or Create a Ticket in the database
104- * Update or Create a TicketMessage in the database.
105- *
106- * @param TicketInterface $ticket
107- * @param TicketMessageInterface $message
108- *
109- * @return TicketInterface
103+ * {@inheritdoc}
110104 */
111105 public function updateTicket (TicketInterface $ ticket , TicketMessageInterface $ message = null )
112106 {
@@ -119,13 +113,14 @@ public function updateTicket(TicketInterface $ticket, TicketMessageInterface $me
119113 }
120114 $ this ->objectManager ->flush ();
121115
116+ // NEXT_MAJOR: Remove the `return` statement.
122117 return $ ticket ;
123118 }
124119
125120 /**
126121 * Delete a ticket from the database.
127122 *
128- * @param TicketInterface $ticket*
123+ * @param TicketInterface $ticket
129124 */
130125 public function deleteTicket (TicketInterface $ ticket )
131126 {
@@ -180,16 +175,34 @@ public function findTicketsBy(array $criteria)
180175 }
181176
182177 /**
178+ * NEXT_MAJOR: Remove this method.
179+ *
180+ * @deprecated since hackzilla/ticket-bundle 3.3, use `getTicketListQuery()` instead.
181+ *
183182 * @param UserManagerInterface $userManager
184183 * @param int $ticketStatus
185184 * @param int $ticketPriority
186185 *
187186 * @return mixed
188187 */
189188 public function getTicketList (UserManagerInterface $ userManager , $ ticketStatus , $ ticketPriority = null )
189+ {
190+ @trigger_error (sprintf (
191+ 'Method `%s()` is deprecated since hackzilla/ticket-bundle 3.3 and will be removed in version 4.0. '
192+ .' Use `%s::getTicketListQuery()` instead. ' ,
193+ __METHOD__ ,
194+ __CLASS__
195+ ), E_USER_DEPRECATED );
196+
197+ return $ query ->getTicketListQuery ($ userManager , $ ticketStatus , $ ticketPriority );
198+ }
199+
200+ /**
201+ * {@inheritdoc}
202+ */
203+ public function getTicketListQuery (UserManagerInterface $ userManager , $ ticketStatus , $ ticketPriority = null )
190204 {
191205 $ query = $ this ->ticketRepository ->createQueryBuilder ('t ' )
192- // ->select($this->ticketClass.' t')
193206 ->orderBy ('t.lastMessage ' , 'DESC ' );
194207
195208 switch ($ ticketStatus ) {
0 commit comments