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