applications ??= $this->collectionFactory->create() ->addFieldToFilter('customer_id', (int)$this->customerSession->getCustomerId()) ->setOrder('created_at', 'DESC'); } public function getCurrentApplication(): ?VatApplication { $application = $this->registry->registry('current_customer_vat'); return $application instanceof VatApplication ? $application : null; } public function getCountryOptions(): array { return $this->euCountries->getOptions(); } public function getCountryName(string $countryId): string { foreach ($this->getCountryOptions() as $option) { if ($option['value'] === $countryId) { return (string)$option['label']; } } return $countryId; } public function getStatusLabel(string $status): string { return (string)(VatApplication::getStatuses()[$status] ?? $status); } }