From 9b9129708cc3372cc040ef3219685521d97c73b0 Mon Sep 17 00:00:00 2001 From: Lars Olesen Date: Mon, 4 Oct 2021 20:32:21 +0200 Subject: [PATCH 1/2] Fixes TidlSkole character limit (#29) --- src/Client.php | 5 +++++ tests/RegistrationRepositoryTest.php | 1 + 2 files changed, 6 insertions(+) diff --git a/src/Client.php b/src/Client.php index b730300..059a1f2 100644 --- a/src/Client.php +++ b/src/Client.php @@ -86,6 +86,11 @@ public function createNewRegistrations(array $registrations) $value = substr($value, 0, 30); } } + foreach (array('.TidlSkole') as $variable) { + if (strpos($key, $variable) !== false) { + $value = substr($value, 0, 48); + } + } foreach (array('.CprNr') as $variable) { if (strpos($key, $variable) !== false) { $value = substr($value, 0, 20); diff --git a/tests/RegistrationRepositoryTest.php b/tests/RegistrationRepositoryTest.php index 62f22b5..2495a27 100644 --- a/tests/RegistrationRepositoryTest.php +++ b/tests/RegistrationRepositoryTest.php @@ -57,6 +57,7 @@ public function setUp() 'Elev.Mobil' => '75820811', 'Elev.MobilBeskyttet' => 0, // 0 = No, 1 = Yes 'Elev.Email' => 'kontor@vih.dk', + 'Elev.TidlSkole' => 'Vejle Idrætshøjskole Ørnebjergvej 28 7100 Vejle Den Jyske Idrætsskole', 'Elev.Land' => 'Danmark', 'EgneFelter.EgetFelt1' => '[Fri132]Har ungdomsuddannelse', 'EgneFelter.EgetFelt7' => '[Fri082]12.12.2018', From bb62afcf0c68fb1c8ed521978a9bb3628415fe64 Mon Sep 17 00:00:00 2001 From: Lars Olesen Date: Mon, 4 Oct 2021 20:54:33 +0200 Subject: [PATCH 2/2] Fixes funding for packagist.org --- .github/FUNDING.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index a944981..95be3eb 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl liberapay: # Replace with a single Liberapay username issuehunt: # Replace with a single IssueHunt username otechie: # Replace with a single Otechie username -custom: ['https://www.buymeacoffee.com/lsolesen', 'https://www.paypal.me/lsolesen'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] +custom: ['https://www.buymeacoffee.com/lsolesen', 'https://www.paypal.me/lsolesen']