-
Notifications
You must be signed in to change notification settings - Fork 9.4k
fix for Issue #25434 Mail address email constructor argument type inc… #25485
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
fix for Issue #25434 Mail address email constructor argument type inc… #25485
Conversation
Hi @karyna-tsymbal-atwix. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
@@ -29,7 +29,7 @@ class Address | |||
* @param string|null $name | |||
*/ | |||
public function __construct( | |||
?string $email, | |||
string $email, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest changing the getEmail()
method instead of changing the constructor parameters. So we have the constructor untouched but
public function getEmail(): ?string
This solution will be more consistent considering the same approach in getName()
method.
Thank you
Also, after the proposed change, could you cover this case with a unit test, please? The test will instantiate the object with no email and invoke Thank you! |
For QA |
Hi @rogyar, thank you for the review. |
✔️ QA Passed |
Hi @karyna-tsymbal-atwix, thank you for your contribution! |
Description (*)
fix for Issue #25434 Mail address email constructor argument type incorrect
Fixed Issues (if relevant)
Contribution checklist (*)