Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addDocumentPaymentMeanToDirectDebit() now contains $creditorReferenceID parameter #54

Merged
merged 3 commits into from
May 23, 2024

Conversation

danielmarschall
Copy link
Contributor

Fixes #53

@horstoeko
Copy link
Owner

Hi @danielmarschall,

nice... :-) Since your customization is a breaking change, I would like to mark the second parameter as “optional” - something like this:

addDocumentPaymentMeanToDirectDebit(string $buyerIban, ?string $creditorReferenceID = null)

Could you kindly implement it like this?

@danielmarschall
Copy link
Contributor Author

Fixed! Thanks for the hint

@horstoeko
Copy link
Owner

Hi @danielmarschall,

That's almost it... :-)

It should be

public function addDocumentPaymentMeanToDirectDebit(string $buyerIban, ?string $creditorReferenceID = null): ZugferdDocumentBuilder

but not

public function addDocumentPaymentMeanToDirectDebit(string $buyerIban, string $creditorReferenceID=null): ZugferdDocumentBuilder

You forgot the question mark in front of the type declaration. It is also easier to read if you insert a space before and after the =. I know I'm fussy... :-)

@danielmarschall
Copy link
Contributor Author

Done :-)

I also introduced another change to avoid hardcoded strings for payment means. It allows people to better understand what the number means, by hovering over the constant (IDE assumed ofc). What do you think?

@horstoeko
Copy link
Owner

Hi @danielmarschall,

that looks good... Merging....

@horstoeko horstoeko merged commit 8f86816 into horstoeko:master May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Add Creditor ID to addDocumentPaymentMeanToDirectDebit()?
2 participants