Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

fix: refactor date constants to static variables #15

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion module/Application/src/Controller/UndertakingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion module/Olcs/src/Table/Tables/correspondence.table.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

use Common\Module;
use Common\Service\Table\Formatter\AccessedCorrespondence;
use Common\Service\Table\Formatter\LicenceNumberLink;

Expand Down Expand Up @@ -28,7 +29,7 @@
'width' => '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 '';
},
Expand Down
Loading