From 4b4f7d922f42abc920dd177460adbd9a24296ce5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20M=C3=BCller?= Date: Sun, 23 Aug 2026 14:12:13 +0200 Subject: [PATCH] Type-safety for action classes and use DateTimeInterface --- src/Action/GetBalance.php | 10 ++--- src/Action/GetDepotAufstellung.php | 14 +++---- src/Action/GetSEPAAccounts.php | 4 +- src/Action/GetSEPADirectDebitParameters.php | 11 +++--- src/Action/GetStatementOfAccount.php | 38 ++++++++----------- src/Action/GetStatementOfAccountXML.php | 25 ++++++------ .../SendInternationalCreditTransfer.php | 11 +++--- src/Action/SendSEPADirectDebit.php | 25 +++++------- src/Action/SendSEPARealtimeTransfer.php | 11 +++--- src/Action/SendSEPATransfer.php | 14 +++---- 10 files changed, 71 insertions(+), 92 deletions(-) diff --git a/src/Action/GetBalance.php b/src/Action/GetBalance.php index aee9dfeb..14abeb8b 100644 --- a/src/Action/GetBalance.php +++ b/src/Action/GetBalance.php @@ -1,5 +1,7 @@ $to) { throw new \InvalidArgumentException('From-date must be before to-date'); diff --git a/src/Action/GetStatementOfAccountXML.php b/src/Action/GetStatementOfAccountXML.php index 47b73dd1..6bc3c87a 100644 --- a/src/Action/GetStatementOfAccountXML.php +++ b/src/Action/GetStatementOfAccountXML.php @@ -1,5 +1,7 @@ $to) { throw new \InvalidArgumentException('From-date must be before to-date'); diff --git a/src/Action/SendInternationalCreditTransfer.php b/src/Action/SendInternationalCreditTransfer.php index b6ab9181..3030e7f5 100644 --- a/src/Action/SendInternationalCreditTransfer.php +++ b/src/Action/SendInternationalCreditTransfer.php @@ -1,5 +1,7 @@ .*?(?[0-9.]+).*?@s', $painMessage, $matches) === 1) { - $ctrlSum = $matches['ctrlsum']; + $ctrlSum = (float) $matches['ctrlsum']; } if (preg_match('@.*?.*?(?CORE|COR1|B2B).*?.*?@s', $painMessage, $matches) === 1) { diff --git a/src/Action/SendSEPARealtimeTransfer.php b/src/Action/SendSEPARealtimeTransfer.php index 6cbadaaf..7ef68958 100644 --- a/src/Action/SendSEPARealtimeTransfer.php +++ b/src/Action/SendSEPARealtimeTransfer.php @@ -1,5 +1,7 @@