public function update($id, $data) { if (!array_key_exists('metadata', $data)) { return $this->apiProblem(422, "No metadata given for the task"); } $this->commandBus->dispatch(UpdateTaskMetadata::to($data['metadata'], $id)); return $this->accepted(); }