From ab4d9919a25ddf6bb46f82f895179457cb721e33 Mon Sep 17 00:00:00 2001 From: JoshuaLicense Date: Tue, 9 Jan 2024 14:30:39 +0000 Subject: [PATCH 1/2] chore: add Dependabot config (#10) --- .github/dependabot.yaml | 47 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/dependabot.yaml diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 000000000..9e9247644 --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,47 @@ +version: 2 +updates: + - package-ecosystem: "composer" + directory: "/" + versioning-strategy: "increase-if-necessary" + schedule: + interval: "weekly" + groups: + composer-dependencies: + patterns: + - "*" + + - package-ecosystem: "composer" + directory: "/vendor-bin/phpcs" + schedule: + interval: "weekly" + groups: + composer-dependencies: + patterns: + - "*" + + - package-ecosystem: "composer" + directory: "/vendor-bin/phpstan" + schedule: + interval: "weekly" + groups: + composer-dependencies: + patterns: + - "*" + + - package-ecosystem: "composer" + directory: "/vendor-bin/psalm" + schedule: + interval: "weekly" + groups: + composer-dependencies: + patterns: + - "*" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + groups: + github-action-dependencies: + patterns: + - "*" From c9c54e3de08fdc20b2741bca21fa2261b5c759f3 Mon Sep 17 00:00:00 2001 From: JoshuaLicense Date: Fri, 12 Jan 2024 13:50:53 +0000 Subject: [PATCH 2/2] fix: refactor constants to static variables (#15) --- 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 ''; },