$args * @return array{id: int, owner_id: int, title: string, card_count: int, completed_count: int, created_at: string, updated_at: string} */ protected function requireOwnedProject(Request $request, array $args): array { $project = $this->projects->findOwnedBy((int) $args['projectId'], $this->user($request)['id']); if ($project === null) { throw new ApiException('Project not found.', 404); } return $project; } /** * @param array $args */ protected function requireOwnedProjectId(Request $request, array $args): int { return $this->requireOwnedProject($request, $args)['id']; } }