diff --git a/.gitignore b/.gitignore index 60628f8f..ebd1a7a5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .DS_Store .idea/ +.vscode/ vendor/ develop/ coverage/ diff --git a/lib/Fhp/Segment/HIUPD/HIUPDv6.php b/lib/Fhp/Segment/HIUPD/HIUPDv6.php index 710eae49..3ecd9d6f 100644 --- a/lib/Fhp/Segment/HIUPD/HIUPDv6.php +++ b/lib/Fhp/Segment/HIUPD/HIUPDv6.php @@ -53,7 +53,11 @@ class HIUPDv6 extends BaseSegment implements HIUPD public function matchesAccount(SEPAAccount $account): bool { - return !is_null($this->iban) && $this->iban == $account->getIban(); + if (!is_null($this->iban)) { + return $this->iban == $account->getIban(); + } + // Sparkasse (Koblenz) does not provide an IBAN in this segment, fall back to kontonummer: + return !is_null($this->kontoverbindung->kontonummer) && $this->kontoverbindung->kontonummer == $account->getAccountNumber(); } public function getErlaubteGeschaeftsvorfaelle(): array diff --git a/lib/Fhp/Syntax/Serializer.php b/lib/Fhp/Syntax/Serializer.php index 155263c9..c0d64ff3 100644 --- a/lib/Fhp/Syntax/Serializer.php +++ b/lib/Fhp/Syntax/Serializer.php @@ -77,7 +77,7 @@ public static function serializeSegment(BaseSegment $segment): string */ public static function serializeSegments(array $segments): string { - return implode(array_map(['self', 'serializeSegment'], $segments)); + return implode(array_map([self::class, 'serializeSegment'], $segments)); } /**