Rework some phpdox in FeedAggregate

This commit is contained in:
Benoît Burnichon
2015-05-14 19:29:15 +02:00
parent e25cd4097c
commit 014733b26f

View File

@@ -13,10 +13,11 @@ namespace Alchemy\Phrasea\Feed;
use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Exception\LogicException; use Alchemy\Phrasea\Exception\LogicException;
use Alchemy\Phrasea\Model\Entities\AggregateToken;
use Alchemy\Phrasea\Model\Entities\Feed;
use Alchemy\Phrasea\Model\Entities\User; use Alchemy\Phrasea\Model\Entities\User;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\EntityManager; use Doctrine\ORM\EntityManagerInterface;
use Alchemy\Phrasea\Model\Entities\AggregateToken;
class Aggregate implements FeedInterface class Aggregate implements FeedInterface
{ {
@@ -26,10 +27,10 @@ class Aggregate implements FeedInterface
/** @var string */ /** @var string */
private $subtitle; private $subtitle;
/** @var DateTime */ /** @var \DateTime */
private $createdOn; private $createdOn;
/** @var DateTime */ /** @var \DateTime */
private $updatedOn; private $updatedOn;
/** @var array */ /** @var array */
@@ -38,17 +39,15 @@ class Aggregate implements FeedInterface
/** @var AggregateToken */ /** @var AggregateToken */
private $token; private $token;
/** @var EntityManager */ /** @var EntityManagerInterface */
private $em; private $em;
/** /**
* @param EntityManager $em * @param EntityManagerInterface $em
* @param array $feeds * @param Feed[] $feeds
* @param AggregateToken $token * @param AggregateToken $token
*
* @return Aggregate
*/ */
public function __construct(EntityManager $em, array $feeds, AggregateToken $token = null) public function __construct(EntityManagerInterface $em, array $feeds, AggregateToken $token = null)
{ {
$this->title = 'AGGREGATE'; $this->title = 'AGGREGATE';
$this->subtitle = 'AGGREGATE SUBTITLE'; $this->subtitle = 'AGGREGATE SUBTITLE';
@@ -64,16 +63,15 @@ class Aggregate implements FeedInterface
$this->feeds = $tmp_feeds; $this->feeds = $tmp_feeds;
$this->token = $token; $this->token = $token;
return $this;
} }
/** /**
* Creates an aggregate from all the feeds available to a given user. * Creates an aggregate from all the feeds available to a given user.
* *
* @param EntityManager $em * @param Application $app
* @param User $user * @param User $user
* *
* @param array $restrictions
* @return Aggregate * @return Aggregate
*/ */
public static function createFromUser(Application $app, User $user, array $restrictions = []) public static function createFromUser(Application $app, User $user, array $restrictions = [])
@@ -87,9 +85,8 @@ class Aggregate implements FeedInterface
/** /**
* Creates an aggregate from given Feed id array. * Creates an aggregate from given Feed id array.
* *
* @param EntityManager $em * @param Application $app
* @param array $feed_ids * @param array $feed_ids
*
* @return Aggregate * @return Aggregate
*/ */
public static function create(Application $app, array $feed_ids) public static function create(Application $app, array $feed_ids)