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

Commit

Permalink
fix: refactor constants to static variables (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaLicense authored Jan 12, 2024
1 parent ab4d991 commit c9c54e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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

0 comments on commit c9c54e3

Please sign in to comment.