/** * @return static */ public function withTokens() { foreach ($this->entity->getUserTokens() as $token) { $this->entityDTO->userTokens[] = $this->dtoBuilderFactory->getUserTokenDTOBuilder($token)->build(); } return $this; }
/** * @return static */ public function withUserToken() { $userToken = $this->entity->getUserToken(); if ($userToken !== null) { $this->entityDTO->userToken = $this->dtoBuilderFactory->getUserTokenDTOBuilder($userToken)->build(); } return $this; }