-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fix phpdoc in ItemConverter.php #25100
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
Method modelToDataObject in ItemConverter.php said it returns an array, but it actually returns an object of type \Magento\Quote\Model\Cart\Totals\Item. Fixing the PHPDoc for the method.
Hi @bradleyfrye. Thank you for your contribution
For more details, please, review the Magento Contributor Guide 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 @bradleyfrye
Thanks for your contribution
Please check my comments. Also please sign CLA
@@ -71,7 +71,7 @@ public function __construct( | |||
* Converts a specified rate model to a shipping method data object. | |||
* | |||
* @param \Magento\Quote\Model\Quote\Item $item | |||
* @return array | |||
* @return \Magento\Quote\Model\Cart\Totals\Item |
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 believe \Magento\Quote\Api\Data\TotalsItemInterface
will be a better option here.
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.
Good point...I actually used that type in a plugin of this method! See my new commit.
Hi @Stepa4man, thank you for the review.
|
@bradleyfrye thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository. |
✔️ QA Passed |
Hi @bradleyfrye, thank you for your contribution! |
Description (*)
Method modelToDataObject in ItemConverter.php said it returns an array, but it actually returns an object of type \Magento\Quote\Model\Cart\Totals\Item. Fixing the PHPDoc for the method.
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)