From 678e9429d817b91351b0da3e46b9191505ba3b3e Mon Sep 17 00:00:00 2001 From: JoshuaLicense Date: Fri, 12 Jan 2024 10:50:37 +0000 Subject: [PATCH] fix: refactor constants to static variables --- module/Application/src/Controller/UndertakingsController.php | 3 ++- module/Olcs/src/Table/Tables/correspondence.table.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/module/Application/src/Controller/UndertakingsController.php b/module/Application/src/Controller/UndertakingsController.php index 44a1cc08f..eea85a3ae 100644 --- a/module/Application/src/Controller/UndertakingsController.php +++ b/module/Application/src/Controller/UndertakingsController.php @@ -3,6 +3,7 @@ namespace Dvsa\Olcs\Application\Controller; use Common\Form\Form; +use Common\Module; use Common\RefData; use Common\Service\Cqrs\Command\CommandService; use Common\Service\Helper\FlashMessengerHelperService; @@ -121,7 +122,7 @@ public function signedAction() /** @var \Common\Service\Helper\TranslationHelperService $translator */ $translator = $this->translationHelper; $form->get('signatureDetails')->get('signature')->setValue( - $translator->translateReplace('undertakings_signed', [$signedBy, $signedDate->format(\DATE_FORMAT)]) + $translator->translateReplace('undertakings_signed', [$signedBy, $signedDate->format(Module::$dateFormat)]) ); return $this->render('undertakings', $form); diff --git a/module/Olcs/src/Table/Tables/correspondence.table.php b/module/Olcs/src/Table/Tables/correspondence.table.php index 19e0e456f..2cd72691b 100644 --- a/module/Olcs/src/Table/Tables/correspondence.table.php +++ b/module/Olcs/src/Table/Tables/correspondence.table.php @@ -1,5 +1,6 @@ '20%', 'formatter' => function ($row) { if (isset($row['correspondence']['document']['issuedDate'])) { - return date(\DATE_FORMAT, strtotime($row['correspondence']['document']['issuedDate'])); + return date(Module::$dateFormat, strtotime($row['correspondence']['document']['issuedDate'])); } return ''; },