-
Notifications
You must be signed in to change notification settings - Fork 35
Request example for Create user on PHP: setDateOfBirth method is not correct #32
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
Conversation
| public function setDateOfBirth($dateOfBirth = null) | ||
| { | ||
| $stringToDate = $dateOfBirth === null ? null : new \DateTime($dateOfBirth); | ||
| $this->dateOfBirth = $stringToDate == null ? null : $stringToDate->format('Y-m-d'); |
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.
As this date manipulation is done in several places, I suggest to make a common util method and use it in different places
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.
Done, thank you.
|
|
||
| class StringToDataConverter | ||
| { | ||
| static function convertStringToDate($string, $format) |
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.
Can we cover this method with tests?
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.
Done.
gmeyer-hw
left a comment
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 read the requirement and I noticed the doc-portal doesn't contain valid code snippet for the Python, Java and PHP SDK. I added more info on the ticket.
|
It's not necessary anymore because there is an another pr for solving this problem https://github.com/hyperwallet/program-portal/pull/215 |
https://jira.site1.hyperwallet.local/browse/HW-54154