repo->ofId($cmd->workspaceId); $ws->acceptInvitation($cmd->id, $cmd->user); $cmd->user->setCurrentWorkspace($ws); return $ws; } }