From ace98f87e9db8c51bf98f51e3e122c913236badc Mon Sep 17 00:00:00 2001 From: Daniel Platt Date: Tue, 27 Jun 2017 22:31:30 +0100 Subject: [PATCH] update doc blocks --- Manager/TicketManagerInterface.php | 53 ++++++++++++++++++++++++++++++ Manager/UserManagerInterface.php | 4 +-- Model/TicketInterface.php | 2 +- 3 files changed, 56 insertions(+), 3 deletions(-) diff --git a/Manager/TicketManagerInterface.php b/Manager/TicketManagerInterface.php index eeab91d..5ebe274 100644 --- a/Manager/TicketManagerInterface.php +++ b/Manager/TicketManagerInterface.php @@ -2,25 +2,78 @@ namespace Hackzilla\TicketMessage\Manager; +use Hackzilla\TicketMessage\Model\Pagination; use Hackzilla\TicketMessage\Model\TicketInterface; use Hackzilla\TicketMessage\Model\TicketMessageInterface; interface TicketManagerInterface { + /** + * Create a new instance of Ticket entity. + * + * @return TicketInterface + */ public function createTicket(); + /** + * Create a new instance of TicketMessage Entity. + * + * @param TicketInterface $ticket + * + * @return TicketMessageInterface + */ public function createMessage(TicketInterface $ticket = null); + /** + * Update or Create a Ticket in the database + * Update or Create a TicketMessage in the database. + * + * @param TicketInterface $ticket + * @param TicketMessageInterface $message + * + * @return TicketInterface + */ public function updateTicket(TicketInterface $ticket, TicketMessageInterface $message = null); + /** + * Delete a ticket from the database. + * + * @param TicketInterface $ticket* + */ public function deleteTicket(TicketInterface $ticket); + /** + * Find ticket in the database. + * + * @param int $ticketId + * + * @return TicketInterface + */ public function getTicketById($ticketId); + /** + * Find message in the database. + * + * @param int $ticketMessageId + * + * @return TicketMessageInterface + */ public function getMessageById($ticketMessageId); + /** + * Find all tickets in the database. + * + * @return TicketInterface[] + */ public function findTickets(); + /** + * Find ticket by criteria. + * + * @param array $criteria + * + * @return TicketInterface[] + */ public function findTicketsBy(array $criteria); /** diff --git a/Manager/UserManagerInterface.php b/Manager/UserManagerInterface.php index a4c525d..1a541c9 100644 --- a/Manager/UserManagerInterface.php +++ b/Manager/UserManagerInterface.php @@ -28,8 +28,8 @@ public function getUserById($userId); public function hasRole(UserInterface $user, $role); /** - * @param \Hackzilla\TicketMessage\Model\UserInterface|string $user - * @param TicketInterface $ticket + * @param UserInterface|string $user + * @param TicketInterface $ticket */ public function hasPermission($user, TicketInterface $ticket); } diff --git a/Model/TicketInterface.php b/Model/TicketInterface.php index 4a7bcaf..b2d0aba 100644 --- a/Model/TicketInterface.php +++ b/Model/TicketInterface.php @@ -186,7 +186,7 @@ public function removeMessage(TicketMessageInterface $message); /** * Get messages. * - * @return \Doctrine\Common\Collections\Collection + * @return TicketMessageInterface[] */ public function getMessages(); }