resolver->resolve((string) $request->query->get('domain', '')); $type = 'unknown'; if ($ctx->city !== null) { $type = 'city'; } elseif ($ctx->representation !== null) { $type = 'representation'; } return $this->success([ 'type' => $type, 'city' => $ctx->city === null ? null : [ 'id' => $ctx->city->getId(), 'name' => $ctx->city->getName(), ], 'representation' => $ctx->representation === null ? null : [ 'uuid' => $ctx->representation->getUuid(), 'full_name' => $ctx->representation->getFullName(), 'is_global' => $ctx->representation->isGlobal(), ], ]); } }