diff --git a/Document/Thread.php b/Document/Thread.php index 0fde6299..5083e9bb 100644 --- a/Document/Thread.php +++ b/Document/Thread.php @@ -57,7 +57,7 @@ abstract class Thread extends AbstractThread /** * Gets the users participating in this conversation * - * @return array of ParticipantInterface + * @return ParticipantInterface[] */ public function getParticipants() { diff --git a/DocumentManager/ThreadManager.php b/DocumentManager/ThreadManager.php index bb51e673..60848c64 100644 --- a/DocumentManager/ThreadManager.php +++ b/DocumentManager/ThreadManager.php @@ -98,7 +98,7 @@ public function getParticipantInboxThreadsQueryBuilder(ParticipantInterface $par * In one word: an inbox. * * @param ParticipantInterface $participant - * @return array of ThreadInterface + * @return ThreadInterface[] */ public function findParticipantInboxThreads(ParticipantInterface $participant) { @@ -132,7 +132,7 @@ public function getParticipantSentThreadsQueryBuilder(ParticipantInterface $part * In one word: an sentbox. * * @param ParticipantInterface $participant - * @return array of ThreadInterface + * @return ThreadInterface[] */ public function findParticipantSentThreads(ParticipantInterface $participant) { @@ -192,7 +192,7 @@ public function getParticipantThreadsBySearchQueryBuilder(ParticipantInterface $ * * @param ParticipantInterface $participant * @param string $search - * @return array of ThreadInterface + * @return ThreadInterface[] */ public function findParticipantThreadsBySearch(participantinterface $participant, $search) { @@ -203,7 +203,7 @@ public function findParticipantThreadsBySearch(participantinterface $participant * Gets threads created by a participant * * @param ParticipantInterface $participant - * @return array of ThreadInterface + * @return ThreadInterface[] */ public function findThreadsCreatedBy(ParticipantInterface $participant) { diff --git a/Entity/Thread.php b/Entity/Thread.php index 3f1c192a..c6aba6a5 100644 --- a/Entity/Thread.php +++ b/Entity/Thread.php @@ -9,27 +9,28 @@ use FOS\MessageBundle\Model\ParticipantInterface; use FOS\MessageBundle\Model\ThreadMetadata as ModelThreadMetadata; +use FOS\MessageBundle\Model\ThreadMetadata; abstract class Thread extends BaseThread { /** * Messages contained in this thread * - * @var Collection of MessageInterface + * @var Collection|MessageInterface[] */ protected $messages; /** * Users participating in this conversation * - * @var Collection of ParticipantInterface + * @var Collection|ParticipantInterface[] */ protected $participants; /** * Thread metadata * - * @var Collection of ThreadMetadata + * @var Collection|ThreadMetadata[] */ protected $metadata; @@ -58,7 +59,7 @@ abstract class Thread extends BaseThread /** * Gets the users participating in this conversation * - * @return array of ParticipantInterface + * @return ParticipantInterface[] */ public function getParticipants() { @@ -71,7 +72,7 @@ public function getParticipants() * Since the ORM schema does not map the participants collection field, it * must be created on demand. * - * @return ArrayCollection + * @return ArrayCollection|ParticipantInterface[] */ protected function getParticipantsCollection() { diff --git a/EntityManager/ThreadManager.php b/EntityManager/ThreadManager.php index 65929f17..4df65097 100644 --- a/EntityManager/ThreadManager.php +++ b/EntityManager/ThreadManager.php @@ -117,7 +117,7 @@ public function getParticipantInboxThreadsQueryBuilder(ParticipantInterface $par * In one word: an inbox. * * @param ParticipantInterface $participant - * @return array of ThreadInterface + * @return ThreadInterface[] */ public function findParticipantInboxThreads(ParticipantInterface $participant) { @@ -168,7 +168,7 @@ public function getParticipantSentThreadsQueryBuilder(ParticipantInterface $part * In one word: an sentbox. * * @param ParticipantInterface $participant - * @return array of ThreadInterface + * @return ThreadInterface[] */ public function findParticipantSentThreads(ParticipantInterface $participant) { @@ -235,7 +235,7 @@ public function getParticipantThreadsBySearchQueryBuilder(ParticipantInterface $ * * @param ParticipantInterface $participant * @param string $search - * @return array of ThreadInterface + * @return ThreadInterface[] */ public function findParticipantThreadsBySearch(participantinterface $participant, $search) { @@ -248,7 +248,7 @@ public function findParticipantThreadsBySearch(participantinterface $participant * Gets threads created by a participant * * @param ParticipantInterface $participant - * @return array of ThreadInterface + * @return ThreadInterface[] */ public function findThreadsCreatedBy(ParticipantInterface $participant) { diff --git a/Model/Message.php b/Model/Message.php index c2ad1393..15d07367 100644 --- a/Model/Message.php +++ b/Model/Message.php @@ -51,7 +51,7 @@ abstract class Message implements MessageInterface /** * Collection of MessageMetadata * - * @var Collection of MessageMetadata + * @var Collection|MessageMetadata[] */ protected $metadata; diff --git a/Model/Thread.php b/Model/Thread.php index 163b3a81..20bf9d92 100644 --- a/Model/Thread.php +++ b/Model/Thread.php @@ -37,21 +37,21 @@ abstract class Thread implements ThreadInterface /** * Messages contained in this thread * - * @var Collection of MessageInterface + * @var Collection|MessageInterface[] */ protected $messages; /** * Thread metadata * - * @var Collection of ThreadMetadata + * @var Collection|ThreadMetadata[] */ protected $metadata; /** * Users participating in this conversation * - * @var Collection of ParticipantInterface + * @var Collection|ParticipantInterface[] */ protected $participants; diff --git a/Model/ThreadInterface.php b/Model/ThreadInterface.php index aae174eb..a84c2064 100644 --- a/Model/ThreadInterface.php +++ b/Model/ThreadInterface.php @@ -80,14 +80,14 @@ function getCreatedAt(); * Sets the date this thread was created at * Generally the date of the first message * - * @param DateTime + * @param \DateTime $createdAt */ function setCreatedAt(\DateTime $createdAt); /** * Gets the users participating in this conversation * - * @return array of ParticipantInterface + * @return ParticipantInterface[] */ function getParticipants(); @@ -133,7 +133,9 @@ function setIsDeleted($isDeleted); /** * Get the participants this participant is talking with. * - * @return array of ParticipantInterface + * @param ParticipantInterface $participant + * + * @return ParticipantInterface[] */ function getOtherParticipants(ParticipantInterface $participant); } diff --git a/ModelManager/ThreadManagerInterface.php b/ModelManager/ThreadManagerInterface.php index 56908cae..5177263a 100644 --- a/ModelManager/ThreadManagerInterface.php +++ b/ModelManager/ThreadManagerInterface.php @@ -40,7 +40,7 @@ function getParticipantInboxThreadsQueryBuilder(ParticipantInterface $participan * In one word: an inbox. * * @param ParticipantInterface $participant - * @return array of ThreadInterface + * @return ThreadInterface[] */ function findParticipantInboxThreads(ParticipantInterface $participant); @@ -62,7 +62,7 @@ function getParticipantSentThreadsQueryBuilder(ParticipantInterface $participant * In one word: an sentbox. * * @param ParticipantInterface $participant - * @return array of ThreadInterface + * @return ThreadInterface[] */ function findParticipantSentThreads(ParticipantInterface $participant); @@ -102,7 +102,7 @@ function getParticipantThreadsBySearchQueryBuilder(ParticipantInterface $partici * * @param ParticipantInterface $participant * @param string $search - * @return array of ThreadInterface + * @return ThreadInterface[] */ function findParticipantThreadsBySearch(ParticipantInterface $participant, $search); @@ -110,7 +110,7 @@ function findParticipantThreadsBySearch(ParticipantInterface $participant, $sear * Gets threads created by a participant * * @param ParticipantInterface $participant - * @return array of ThreadInterface + * @return ThreadInterface[] */ function findThreadsCreatedBy(ParticipantInterface $participant); diff --git a/Provider/Provider.php b/Provider/Provider.php index 55fe1ce6..90432752 100644 --- a/Provider/Provider.php +++ b/Provider/Provider.php @@ -2,6 +2,7 @@ namespace FOS\MessageBundle\Provider; +use FOS\MessageBundle\Model\ThreadInterface; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\Security\Core\Exception\AccessDeniedException; use FOS\MessageBundle\ModelManager\ThreadManagerInterface; @@ -64,7 +65,7 @@ public function __construct(ThreadManagerInterface $threadManager, MessageManage /** * Gets the thread in the inbox of the current user * - * @return array of ThreadInterface + * @return ThreadInterface[] */ public function getInboxThreads() { @@ -76,7 +77,7 @@ public function getInboxThreads() /** * Gets the thread in the sentbox of the current user * - * @return array of ThreadInterface + * @return ThreadInterface[] */ public function getSentThreads() { diff --git a/Provider/ProviderInterface.php b/Provider/ProviderInterface.php index ae5369e6..9be5e039 100644 --- a/Provider/ProviderInterface.php +++ b/Provider/ProviderInterface.php @@ -2,6 +2,8 @@ namespace FOS\MessageBundle\Provider; +use FOS\MessageBundle\Model\ThreadInterface; + /** * Provides threads for the current authenticated user * @@ -12,14 +14,14 @@ interface ProviderInterface /** * Gets the thread in the inbox of the current user * - * @return array of ThreadInterface + * @return ThreadInterface[] */ function getInboxThreads(); /** * Gets the thread in the sentbox of the current user * - * @return array of ThreadInterface + * @return ThreadInterface[] */ function getSentThreads(); diff --git a/Search/Finder.php b/Search/Finder.php index 4e4e43d9..c72ee4a2 100644 --- a/Search/Finder.php +++ b/Search/Finder.php @@ -2,6 +2,7 @@ namespace FOS\MessageBundle\Search; +use FOS\MessageBundle\Model\ThreadInterface; use FOS\MessageBundle\ModelManager\ThreadManagerInterface; use FOS\MessageBundle\Security\ParticipantProviderInterface; @@ -36,7 +37,7 @@ public function __construct(ParticipantProviderInterface $participantProvider, T * Finds threads of a participant, matching a given query * * @param Query $query - * @return array of ThreadInterface + * @return ThreadInterface[] */ public function find(Query $query) { diff --git a/Search/FinderInterface.php b/Search/FinderInterface.php index 9dc75d5a..f3708eff 100644 --- a/Search/FinderInterface.php +++ b/Search/FinderInterface.php @@ -2,6 +2,8 @@ namespace FOS\MessageBundle\Search; +use FOS\MessageBundle\Model\ThreadInterface; + /** * Finds threads of a participant, matching a given query * @@ -13,7 +15,7 @@ interface FinderInterface * Finds threads of a participant, matching a given query * * @param Query $query - * @return array of ThreadInterface + * @return ThreadInterface[] */ function find(Query $query);