Skip to content

Commit acf88a4

Browse files
committed
Revert "merge #127 Some minor changes at TicketManager (phansys)"
This reverts commit 758b79e, reversing changes made to 3c1270b.
1 parent 2a2aba0 commit acf88a4

4 files changed

Lines changed: 14 additions & 13 deletions

File tree

Controller/TicketController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function indexAction(Request $request)
3333
$ticketState = $request->get('state', $this->get('translator')->trans('STATUS_OPEN'));
3434
$ticketPriority = $request->get('priority', null);
3535

36-
$query = $ticketManager->getTicketListQuery(
36+
$query = $ticketManager->getTicketList(
3737
$userManager,
3838
$ticketManager->getTicketStatus($ticketState),
3939
$ticketManager->getTicketPriority($ticketPriority)

Manager/TicketManager.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ public function createMessage(TicketInterface $ticket = null)
105105
*
106106
* @param TicketInterface $ticket
107107
* @param TicketMessageInterface $message
108+
*
109+
* @return TicketInterface
108110
*/
109111
public function updateTicket(TicketInterface $ticket, TicketMessageInterface $message = null)
110112
{
@@ -116,12 +118,14 @@ public function updateTicket(TicketInterface $ticket, TicketMessageInterface $me
116118
$this->objectManager->persist($message);
117119
}
118120
$this->objectManager->flush();
121+
122+
return $ticket;
119123
}
120124

121125
/**
122126
* Delete a ticket from the database.
123127
*
124-
* @param TicketInterface $ticket
128+
* @param TicketInterface $ticket*
125129
*/
126130
public function deleteTicket(TicketInterface $ticket)
127131
{
@@ -176,9 +180,13 @@ public function findTicketsBy(array $criteria)
176180
}
177181

178182
/**
179-
* {@inheritdoc}
183+
* @param UserManagerInterface $userManager
184+
* @param int $ticketStatus
185+
* @param int $ticketPriority
186+
*
187+
* @return mixed
180188
*/
181-
public function getTicketListQuery(UserManagerInterface $userManager, $ticketStatus, $ticketPriority = null)
189+
public function getTicketList(UserManagerInterface $userManager, $ticketStatus, $ticketPriority = null)
182190
{
183191
$query = $this->ticketRepository->createQueryBuilder('t')
184192
// ->select($this->ticketClass.' t')

Manager/TicketManagerInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ public function findTicketsBy(array $criteria);
3434
* @param int $ticketStatus
3535
* @param int $ticketPriority
3636
*
37-
* @return \Doctrine\ORM\QueryBuilder
37+
* @return mixed
3838
*/
39-
public function getTicketListQuery(UserManagerInterface $userManager, $ticketStatus, $ticketPriority = null);
39+
public function getTicketList(UserManagerInterface $userManager, $ticketStatus, $ticketPriority = null);
4040

4141
/**
4242
* @param int $days

UPGRADE-3.0.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,3 @@ UPGRADE FROM 2.x to 3.0
44
* Translation catalogues were renamed from "messages" to "HackzillaTicketBundle"
55
in order to allow projects consuming this bundle to override them in a proper
66
way.
7-
8-
* Renamed method `TicketManagerInterface::getTicketList()` to `TicketManagerInterface::getTicketListQuery()`
9-
to clarify what it returns.
10-
11-
* `TicketManagerInterface::updateTicket()` now returns `void`, since the object
12-
(`TicketInterface`) it was returning before is the same as the provided in its
13-
argument 1.

0 commit comments

Comments
 (0)