@@ -591,6 +591,7 @@ public function getPrice()
591
591
* @see \Magento\Catalog\Model\Product\Visibility
592
592
*
593
593
* @return int
594
+ * @codeCoverageIgnoreStart
594
595
*/
595
596
public function getVisibility ()
596
597
{
@@ -813,6 +814,9 @@ public function getStoreIds()
813
814
if (!$ this ->hasStoreIds ()) {
814
815
$ storeIds = [];
815
816
if ($ websiteIds = $ this ->getWebsiteIds ()) {
817
+ if ($ this ->_storeManager ->isSingleStoreMode ()) {
818
+ $ websiteIds = array_keys ($ websiteIds );
819
+ }
816
820
foreach ($ websiteIds as $ websiteId ) {
817
821
$ websiteStores = $ this ->_storeManager ->getWebsite ($ websiteId )->getStoreIds ();
818
822
$ storeIds = array_merge ($ storeIds , $ websiteStores );
@@ -923,7 +927,7 @@ public function beforeSave()
923
927
*
924
928
* If value specified, it will be set.
925
929
*
926
- * @param bool $value
930
+ * @param bool|null $value
927
931
* @return bool
928
932
*/
929
933
public function canAffectOptions ($ value = null )
@@ -1044,7 +1048,8 @@ public function reindex()
1044
1048
*
1045
1049
* Register indexing event before delete product
1046
1050
*
1047
- * @return \Magento\Catalog\Model\Product
1051
+ * @return $this
1052
+ * @throws \Magento\Framework\Exception\LocalizedException
1048
1053
*/
1049
1054
public function beforeDelete ()
1050
1055
{
@@ -1718,8 +1723,6 @@ public function getIsSalable()
1718
1723
/**
1719
1724
* Check is a virtual product
1720
1725
*
1721
- * Data helper wrapper
1722
- *
1723
1726
* @return bool
1724
1727
*/
1725
1728
public function isVirtual ()
@@ -2028,7 +2031,7 @@ public function getIsVirtual()
2028
2031
*
2029
2032
* @param string $code Option code
2030
2033
* @param mixed $value Value of the option
2031
- * @param int|Product $product Product ID
2034
+ * @param int|Product|null $product Product ID
2032
2035
* @return $this
2033
2036
*/
2034
2037
public function addCustomOption ($ code , $ value , $ product = null )
@@ -2222,9 +2225,9 @@ public function getPreconfiguredValues()
2222
2225
}
2223
2226
2224
2227
/**
2225
- * Prepare product custom options.
2228
+ * Prepare product custom options
2226
2229
*
2227
- * To be sure that all product custom options does not has ID and has product instance
2230
+ * To be sure that all product custom options does not has ID and has product instance.
2228
2231
*
2229
2232
* @return \Magento\Catalog\Model\Product
2230
2233
*/
@@ -2581,10 +2584,11 @@ public function setExtensionAttributes(\Magento\Catalog\Api\Data\ProductExtensio
2581
2584
//@codeCoverageIgnoreEnd
2582
2585
2583
2586
/**
2584
- * Convert array to media gallery interface
2587
+ * Convert Image to ProductAttributeMediaGalleryEntryInterface
2585
2588
*
2586
2589
* @param array $mediaGallery
2587
2590
* @return \Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface[]
2591
+ * @throws \Magento\Framework\Exception\LocalizedException
2588
2592
*/
2589
2593
protected function convertToMediaGalleryInterface (array $ mediaGallery )
2590
2594
{
@@ -2603,6 +2607,7 @@ protected function convertToMediaGalleryInterface(array $mediaGallery)
2603
2607
* Returns media gallery entries
2604
2608
*
2605
2609
* @return \Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface[]|null
2610
+ * @throws \Magento\Framework\Exception\LocalizedException
2606
2611
*/
2607
2612
public function getMediaGalleryEntries ()
2608
2613
{
@@ -2620,6 +2625,7 @@ public function getMediaGalleryEntries()
2620
2625
*
2621
2626
* @param ProductAttributeMediaGalleryEntryInterface[] $mediaGalleryEntries
2622
2627
* @return $this
2628
+ * @throws \Magento\Framework\Exception\LocalizedException
2623
2629
*/
2624
2630
public function setMediaGalleryEntries (array $ mediaGalleryEntries = null )
2625
2631
{
0 commit comments