@@ -18,6 +18,9 @@ |
||
| 18 | 18 | |
| 19 | 19 | interface EventStore |
| 20 | 20 | { |
| 21 | + /** |
|
| 22 | + * @return void |
|
| 23 | + */ |
|
| 21 | 24 | public function appendTo(EventStream $events) : void; |
| 22 | 25 | |
| 23 | 26 | public function streamOfId(Id $aggregateId) : EventStream; |
@@ -18,7 +18,15 @@ |
||
| 18 | 18 | |
| 19 | 19 | interface ProjectSpecificationFactory |
| 20 | 20 | { |
| 21 | + /** |
|
| 22 | + * @param null|string $name |
|
| 23 | + * |
|
| 24 | + * @return \Kreta\TaskManager\Infrastructure\Persistence\Doctrine\ORM\Project\DoctrineORMFilterableSpecification |
|
| 25 | + */ |
|
| 21 | 26 | public function buildFilterableSpecification(array $organizationIds, $name, int $offset = 0, int $limit = -1); |
| 22 | 27 | |
| 28 | + /** |
|
| 29 | + * @return \Kreta\TaskManager\Infrastructure\Persistence\Doctrine\ORM\Project\DoctrineORMBySlugSpecification |
|
| 30 | + */ |
|
| 23 | 31 | public function buildBySlugSpecification(Slug $slug, Slug $organizationSlug); |
| 24 | 32 | } |
@@ -18,6 +18,13 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | interface TaskSpecificationFactory |
| 20 | 20 | { |
| 21 | + /** |
|
| 22 | + * @param null|string $title |
|
| 23 | + * @param TaskPriority $priority |
|
| 24 | + * @param TaskProgress $progress |
|
| 25 | + * |
|
| 26 | + * @return \Kreta\TaskManager\Infrastructure\Persistence\Doctrine\ORM\Project\Task\DoctrineORMFilterableSpecification |
|
| 27 | + */ |
|
| 21 | 28 | public function buildFilterableSpecification( |
| 22 | 29 | array $projectIds, |
| 23 | 30 | ?string $title, |
@@ -30,5 +37,8 @@ discard block |
||
| 30 | 37 | int $limit = -1 |
| 31 | 38 | ); |
| 32 | 39 | |
| 40 | + /** |
|
| 41 | + * @return \Kreta\TaskManager\Infrastructure\Persistence\Doctrine\ORM\Project\Task\DoctrineORMFilterableSpecification |
|
| 42 | + */ |
|
| 33 | 43 | public function buildByProjectSpecification(ProjectId $projectId); |
| 34 | 44 | } |
@@ -16,14 +16,26 @@ |
||
| 16 | 16 | |
| 17 | 17 | interface ProjectRepository |
| 18 | 18 | { |
| 19 | + /** |
|
| 20 | + * @return Project|null |
|
| 21 | + */ |
|
| 19 | 22 | public function projectOfId(ProjectId $id) : ?Project; |
| 20 | 23 | |
| 21 | 24 | public function query($specification) : array; |
| 22 | 25 | |
| 26 | + /** |
|
| 27 | + * @return Project|null |
|
| 28 | + */ |
|
| 23 | 29 | public function singleResultQuery($specification) : ?Project; |
| 24 | 30 | |
| 31 | + /** |
|
| 32 | + * @return void |
|
| 33 | + */ |
|
| 25 | 34 | public function persist(Project $project) : void; |
| 26 | 35 | |
| 36 | + /** |
|
| 37 | + * @return void |
|
| 38 | + */ |
|
| 27 | 39 | public function remove(Project $project) : void; |
| 28 | 40 | |
| 29 | 41 | public function count($specification) : int; |
@@ -22,6 +22,9 @@ |
||
| 22 | 22 | private $parentId; |
| 23 | 23 | private $occurredOn; |
| 24 | 24 | |
| 25 | + /** |
|
| 26 | + * @param null|TaskId $parentId |
|
| 27 | + */ |
|
| 25 | 28 | public function __construct(TaskId $id, ?TaskId $parentId) |
| 26 | 29 | { |
| 27 | 30 | $this->id = $id; |
@@ -20,8 +20,14 @@ |
||
| 20 | 20 | |
| 21 | 21 | public function query($specification) : array; |
| 22 | 22 | |
| 23 | + /** |
|
| 24 | + * @return void |
|
| 25 | + */ |
|
| 23 | 26 | public function persist(Task $task) : void; |
| 24 | 27 | |
| 28 | + /** |
|
| 29 | + * @return void |
|
| 30 | + */ |
|
| 25 | 31 | public function remove(Task $task) : void; |
| 26 | 32 | |
| 27 | 33 | public function count($specification) : int; |
@@ -75,6 +75,11 @@ |
||
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | + /** |
|
| 79 | + * @param integer $index |
|
| 80 | + * |
|
| 81 | + * @return string |
|
| 82 | + */ |
|
| 78 | 83 | private function taskPriority($index) |
| 79 | 84 | { |
| 80 | 85 | $priorityIndex = $index % 2 > 3 ? 0 : 2 - $index % 3; |
@@ -22,5 +22,8 @@ |
||
| 22 | 22 | |
| 23 | 23 | public function usersOfIds(array $userIds) : array; |
| 24 | 24 | |
| 25 | + /** |
|
| 26 | + * @param string $search |
|
| 27 | + */ |
|
| 25 | 28 | public function usersOfSearchString($search, array $excludedIds = []) : array; |
| 26 | 29 | } |
@@ -150,6 +150,9 @@ |
||
| 150 | 150 | return $this->owners; |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | + /** |
|
| 154 | + * @return Member |
|
| 155 | + */ |
|
| 153 | 156 | public function owner(UserId $userId) : ?Owner |
| 154 | 157 | { |
| 155 | 158 | foreach ($this->owners() as $owner) { |