From 0f4fbc347477df7f31ab7e12b187d5ca8c9c0260 Mon Sep 17 00:00:00 2001 From: Wade Womersley <155439365+wadedvsa@users.noreply.github.com> Date: Tue, 2 Apr 2024 19:38:47 +0100 Subject: [PATCH] fix: Not able to surrender a psv licence (dvsa/olcs-selfserve#111) * fix: Not able to surrender a psv licence * chore: Remove redundant comment --- .../Licence/Surrender/StartController.php | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/app/selfserve/module/Olcs/src/Controller/Licence/Surrender/StartController.php b/app/selfserve/module/Olcs/src/Controller/Licence/Surrender/StartController.php index e9001d1dc2..cbd2083e85 100644 --- a/app/selfserve/module/Olcs/src/Controller/Licence/Surrender/StartController.php +++ b/app/selfserve/module/Olcs/src/Controller/Licence/Surrender/StartController.php @@ -13,6 +13,7 @@ use Laminas\Http\Response; use Laminas\I18n\Translator\Translator; use Laminas\Mvc\MvcEvent; +use Laminas\View\Model\ViewModel; use Olcs\Controller\AbstractSelfserveController; use Olcs\Controller\Config\DataSource\DataSourceConfig; use Permits\Controller\Config\FeatureToggle\FeatureToggleConfig; @@ -68,7 +69,7 @@ public function onDispatch(MvcEvent $e) /** * IndexAction * - * @return array|\Laminas\View\Model\ViewModel + * @return array|ViewModel */ public function indexAction() { @@ -126,7 +127,7 @@ private function getGvData(): array * * @psalm-return array{pageTitle: 'licence.surrender.start.title.psv', cancelBus: list{mixed}} */ - private function getPsvData(Translator $translateService): array + private function getPsvData(TranslationHelperService $translateService): array { return [ 'pageTitle' => 'licence.surrender.start.title.psv', @@ -134,15 +135,7 @@ private function getPsvData(Translator $translateService): array ]; } - /** - * getView - * - * @param array $licence - * @param Translator $translateService - * - * @return \Laminas\View\Model\ViewModel - */ - private function getView($licence, $translateService): \Laminas\View\Model\ViewModel + private function getView(array $licence, TranslationHelperService $translateService): ViewModel { $view = $this->genericView();