Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Document/Thread.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
8 changes: 4 additions & 4 deletions DocumentManager/ThreadManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand All @@ -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)
{
Expand Down
11 changes: 6 additions & 5 deletions Entity/Thread.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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()
{
Expand All @@ -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()
{
Expand Down
8 changes: 4 additions & 4 deletions EntityManager/ThreadManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand All @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion Model/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ abstract class Message implements MessageInterface
/**
* Collection of MessageMetadata
*
* @var Collection of MessageMetadata
* @var Collection|MessageMetadata[]
*/
protected $metadata;

Expand Down
6 changes: 3 additions & 3 deletions Model/Thread.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
8 changes: 5 additions & 3 deletions Model/ThreadInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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);
}
8 changes: 4 additions & 4 deletions ModelManager/ThreadManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);

Expand Down Expand Up @@ -102,15 +102,15 @@ function getParticipantThreadsBySearchQueryBuilder(ParticipantInterface $partici
*
* @param ParticipantInterface $participant
* @param string $search
* @return array of ThreadInterface
* @return ThreadInterface[]
*/
function findParticipantThreadsBySearch(ParticipantInterface $participant, $search);

/**
* Gets threads created by a participant
*
* @param ParticipantInterface $participant
* @return array of ThreadInterface
* @return ThreadInterface[]
*/
function findThreadsCreatedBy(ParticipantInterface $participant);

Expand Down
5 changes: 3 additions & 2 deletions Provider/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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()
{
Expand All @@ -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()
{
Expand Down
6 changes: 4 additions & 2 deletions Provider/ProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace FOS\MessageBundle\Provider;

use FOS\MessageBundle\Model\ThreadInterface;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put an empty line before :) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


/**
* Provides threads for the current authenticated user
*
Expand All @@ -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();

Expand Down
3 changes: 2 additions & 1 deletion Search/Finder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace FOS\MessageBundle\Search;

use FOS\MessageBundle\Model\ThreadInterface;
use FOS\MessageBundle\ModelManager\ThreadManagerInterface;
use FOS\MessageBundle\Security\ParticipantProviderInterface;

Expand Down Expand Up @@ -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)
{
Expand Down
4 changes: 3 additions & 1 deletion Search/FinderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace FOS\MessageBundle\Search;

use FOS\MessageBundle\Model\ThreadInterface;
Copy link
Contributor

@tgalopin tgalopin Aug 26, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put an empty line before :) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not on this one :) . You had two.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Other one ? :). My idea conf is a bit weird.


/**
* Finds threads of a participant, matching a given query
*
Expand All @@ -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);

Expand Down