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

Fix incorrect return type for getOptionByCode method #39389

Open
wants to merge 1 commit into
base: 2.4-develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@

namespace Magento\Catalog\Model\Product\Configuration\Item;

use Magento\Catalog\Model\Product;
use Magento\Catalog\Model\Product\Configuration\Item\Option\OptionInterface;
use Magento\Framework\DataObject;

/**
* Product configurational item interface
* Product configuration item interface
*
* @api
* @since 100.0.2
Expand All @@ -17,15 +21,15 @@ interface ItemInterface
/**
* Retrieve associated product
*
* @return \Magento\Catalog\Model\Product
* @return Product
*/
public function getProduct();

/**
* Get item option by code
*
* @param string $code
* @return \Magento\Catalog\Model\Product\Configuration\Item\Option\OptionInterface
* @return OptionInterface|null
*/
public function getOptionByCode($code);

Expand All @@ -36,7 +40,7 @@ public function getOptionByCode($code);
* - 'url' - url of controller to give the file
* - 'urlParams' - additional parameters for url (custom option id, or item id, for example)
*
* @return null|\Magento\Framework\DataObject
* @return null|DataObject
*/
public function getFileDownloadParams();
}
2 changes: 1 addition & 1 deletion app/code/Magento/Quote/Model/Quote/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ protected function _addOptionCode($option)
* Get item option by code
*
* @param string $code
* @return \Magento\Quote\Model\Quote\Item\Option || null
* @return \Magento\Quote\Model\Quote\Item\Option|null
*/
public function getOptionByCode($code)
{
Expand Down