| 1 | <?php |
||
| 18 | class Query |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * Task Repository |
||
| 22 | * |
||
| 23 | * @var TaskRepositoryInterface |
||
| 24 | */ |
||
| 25 | protected $taskRepository; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Query constructor |
||
| 29 | * |
||
| 30 | * @param TaskRepositoryInterface $taskRepository Task Repository |
||
| 31 | */ |
||
| 32 | public function __construct(TaskRepositoryInterface $taskRepository) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Get All Remaining Tasks |
||
| 39 | * |
||
| 40 | * @return array |
||
| 41 | */ |
||
| 42 | public function getAllRemainingTasks() : array |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Get All Completed Tasks |
||
| 49 | * |
||
| 50 | * @return array |
||
| 51 | */ |
||
| 52 | public function getAllCompletedTasks() : array |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Get Task By Id |
||
| 59 | * |
||
| 60 | * @param string $taskId Task ID |
||
| 61 | * |
||
| 62 | * @return Task |
||
| 63 | * @throws TaskNotFoundException |
||
| 64 | */ |
||
| 65 | public function getTaskById($taskId) : Task |
||
| 75 | } |
||
| 76 |