-
Notifications
You must be signed in to change notification settings - Fork 9.4k
#16445 - getRegionHtmlSelect does not have configuration - resolved #22834
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
#16445 - getRegionHtmlSelect does not have configuration - resolved #22834
Conversation
Hi @nikunjskd20. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
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.
Hi @nikunjskd20,
Thank you for your contribution!
Your PR looks good, but there are some things which need to be adjusted.
Please check my comment.
Please check failed static 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.
Hi @nikunjskd20,
Thank you for your changes!
We almost finish, but beforoe we here there are few thing which need to be done.
So, could you please:
- add
declare(strict_types=1);
to the beginning of the file; - check my comments about minor changes request;
- check and fix failed tests;
* @param string $title | ||
* @return string | ||
*/ | ||
public function getRegionSelect($value = null, $name = 'region', $id = 'state', $title = 'State/Province') |
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.
Could you please add typehints for method arguments and return typehint ?
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.
Is it necessary to add declare(strict_types=1);
at the beginning of file?
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.
According to Technical Guidelines #1.3.1
, this is should be done.
But as we are introducing a new method, it is better to use strict types, as is described in #1.3
and where PHP is aiming (PSR-12).
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 think this is better to use ?int $value = null,
instead of string $value = null,
to avoid double conversion to int.
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.
yeah, sure.
Hi @swnsma, thank you for the review. |
@nikunjskd20 thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository. |
Hi @swnsma, do I need to do anything or this pull request will merge automatically? |
Hi @nikunjskd20. |
✔️ QA passed |
@nikunjskd20, @swnsma please reduce the number of commits. |
…uration - resolved magento#22834
Hi @nikunjskd20, thank you for your contribution! |
Description (*)
To give region field a name like array Ex. name="somearray[region]" and getting data as array value.
Fixed Issues (if relevant)
Manual testing scenarios (*)
Contribution checklist (*)