ensureTask($jobId, $taskId); return $this->comments->findForTask($taskId, $commentId) ?? throw new TaskCommentNotFound($taskId, $commentId); } /** * @throws TaskNotFound */ public function ensureTask(int $jobId, int $taskId): void { if ($this->tasks->findForJob($jobId, $taskId) === null) { throw new TaskNotFound($jobId, $taskId); } } }