Skip to content

Commit

Permalink
update doc blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
hackzilla committed Jun 27, 2017
1 parent b036482 commit ace98f8
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 3 deletions.
53 changes: 53 additions & 0 deletions Manager/TicketManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/**
Expand Down
4 changes: 2 additions & 2 deletions Manager/UserManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
2 changes: 1 addition & 1 deletion Model/TicketInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public function removeMessage(TicketMessageInterface $message);
/**
* Get messages.
*
* @return \Doctrine\Common\Collections\Collection
* @return TicketMessageInterface[]
*/
public function getMessages();
}

0 comments on commit ace98f8

Please sign in to comment.