@@ -497,11 +497,13 @@ protected function _getResource()
497497 return parent ::_getResource ();
498498 }
499499
500+ //@codeCoverageIgnoreStart
500501 /**
501502 * Get a list of custom attribute codes that belongs to product attribute set. If attribute set not specified for
502503 * product will return all product attribute codes
503504 *
504505 * @return string[]
506+ * //@codeCoverageIgnoreEnd
505507 */
506508 protected function getCustomAttributesCodes ()
507509 {
@@ -584,11 +586,12 @@ public function getPrice()
584586 }
585587
586588 /**
587- * @codeCoverageIgnoreStart
588589 * Get visibility status
590+ *
589591 * @see \Magento\Catalog\Model\Product\Visibility
590592 *
591593 * @return int
594+ * @codeCoverageIgnoreStart
592595 */
593596 public function getVisibility ()
594597 {
@@ -824,10 +827,9 @@ public function getStoreIds()
824827 }
825828
826829 /**
827- * Retrieve product attributes
828- * if $groupId is null - retrieve all product attributes
830+ * Retrieve product attributes. If $groupId is null - retrieve all product attributes
829831 *
830- * @param int $groupId Retrieve attributes of the specified group
832+ * @param int|null $groupId Retrieve attributes of the specified group
831833 * @param bool $skipSuper Not used
832834 * @return \Magento\Eav\Model\Entity\Attribute\AbstractAttribute[]
833835 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
@@ -918,10 +920,9 @@ public function beforeSave()
918920 }
919921
920922 /**
921- * Check/set if options can be affected when saving product
922- * If value specified, it will be set.
923+ * Check/set if options can be affected when saving product. If value specified, it will be set.
923924 *
924- * @param bool $value
925+ * @param bool|null $value
925926 * @return bool
926927 */
927928 public function canAffectOptions ($ value = null )
@@ -1038,10 +1039,10 @@ public function reindex()
10381039 }
10391040
10401041 /**
1041- * Clear cache related with product and protect delete from not admin
1042- * Register indexing event before delete product
1042+ * Clear cache related with product and protect delete from not admin. Register indexing event before delete product
10431043 *
1044- * @return \Magento\Catalog\Model\Product
1044+ * @return $this
1045+ * @throws \Magento\Framework\Exception\LocalizedException
10451046 */
10461047 public function beforeDelete ()
10471048 {
@@ -1548,12 +1549,13 @@ public function hasGalleryAttribute()
15481549 /**
15491550 * Add image to media gallery
15501551 *
1551- * @param string $file file path of image in file system
1552- * @param string|array $mediaAttribute code of attribute with type 'media_image',
1553- * leave blank if image should be only in gallery
1554- * @param boolean $move if true, it will move source file
1555- * @param boolean $exclude mark image as disabled in product page view
1556- * @return \Magento\Catalog\Model\Product
1552+ * @param string $file File path of image in file system
1553+ * @param null|string|array $mediaAttribute Code of attribute with type 'media_image'
1554+ * Leave blank if image should be only in gallery
1555+ * @param bool $move If true, it will move source file
1556+ * @param bool $exclude Mark image as disabled in product page view
1557+ * @return $this
1558+ * @throws \Magento\Framework\Exception\LocalizedException
15571559 */
15581560 public function addImageToMediaGallery ($ file , $ mediaAttribute = null , $ move = false , $ exclude = true )
15591561 {
@@ -1714,7 +1716,6 @@ public function getIsSalable()
17141716
17151717 /**
17161718 * Check is a virtual product
1717- * Data helper wrapper
17181719 *
17191720 * @return bool
17201721 */
@@ -1806,9 +1807,9 @@ public function formatUrlKey($str)
18061807 /**
18071808 * Save current attribute with code $code and assign new value
18081809 *
1809- * @param string $code Attribute code
1810- * @param mixed $value New attribute value
1811- * @param int $store Store ID
1810+ * @param string $code Attribute code
1811+ * @param mixed $value New attribute value
1812+ * @param int $store Store ID
18121813 * @return void
18131814 */
18141815 public function addAttributeUpdate ($ code , $ value , $ store )
@@ -1878,6 +1879,7 @@ public function getRequestPath()
18781879
18791880 /**
18801881 * Custom function for other modules
1882+ *
18811883 * @return string
18821884 */
18831885 public function getGiftMessageAvailable ()
@@ -1996,6 +1998,8 @@ public function getOptions()
19961998 }
19971999
19982000 /**
2001+ * Set Options
2002+ *
19992003 * @param \Magento\Catalog\Api\Data\ProductCustomOptionInterface[] $options
20002004 * @return $this
20012005 */
@@ -2019,10 +2023,10 @@ public function getIsVirtual()
20192023 /**
20202024 * Add custom option information to product
20212025 *
2022- * @param string $code Option code
2023- * @param mixed $value Value of the option
2024- * @param int|Product $product Product ID
2025- * @return $this
2026+ * @param string $code Option code
2027+ * @param mixed $value Value of the option
2028+ * @param int|Product|null $product Product ID
2029+ * @return $this
20262030 */
20272031 public function addCustomOption ($ code , $ value , $ product = null )
20282032 {
@@ -2215,8 +2219,7 @@ public function getPreconfiguredValues()
22152219 }
22162220
22172221 /**
2218- * Prepare product custom options.
2219- * To be sure that all product custom options does not has ID and has product instance
2222+ * Prepare product custom options.To be sure that all product custom options does not has ID and has product instance
22202223 *
22212224 * @return \Magento\Catalog\Model\Product
22222225 */
@@ -2550,7 +2553,7 @@ public function setTypeId($typeId)
25502553 }
25512554
25522555 /**
2553- * {@inheritdoc}
2556+ * Get Extension Attributes
25542557 *
25552558 * @return \Magento\Catalog\Api\Data\ProductExtensionInterface
25562559 */
@@ -2560,7 +2563,7 @@ public function getExtensionAttributes()
25602563 }
25612564
25622565 /**
2563- * {@inheritdoc}
2566+ * Set Extension Attributes
25642567 *
25652568 * @param \Magento\Catalog\Api\Data\ProductExtensionInterface $extensionAttributes
25662569 * @return $this
@@ -2573,8 +2576,11 @@ public function setExtensionAttributes(\Magento\Catalog\Api\Data\ProductExtensio
25732576 //@codeCoverageIgnoreEnd
25742577
25752578 /**
2579+ * Convert Image to ProductAttributeMediaGalleryEntryInterface
2580+ *
25762581 * @param array $mediaGallery
25772582 * @return \Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface[]
2583+ * @throws \Magento\Framework\Exception\LocalizedException
25782584 */
25792585 protected function convertToMediaGalleryInterface (array $ mediaGallery )
25802586 {
@@ -2590,7 +2596,10 @@ protected function convertToMediaGalleryInterface(array $mediaGallery)
25902596 }
25912597
25922598 /**
2599+ * Get Media Gallery
2600+ *
25932601 * @return \Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface[]|null
2602+ * @throws \Magento\Framework\Exception\LocalizedException
25942603 */
25952604 public function getMediaGalleryEntries ()
25962605 {
@@ -2604,8 +2613,11 @@ public function getMediaGalleryEntries()
26042613 }
26052614
26062615 /**
2616+ * Set Media Gallery
2617+ *
26072618 * @param ProductAttributeMediaGalleryEntryInterface[] $mediaGalleryEntries
26082619 * @return $this
2620+ * @throws \Magento\Framework\Exception\LocalizedException
26092621 */
26102622 public function setMediaGalleryEntries (array $ mediaGalleryEntries = null )
26112623 {
@@ -2646,6 +2658,8 @@ public function setId($value)
26462658 }
26472659
26482660 /**
2661+ * Get Product Link Repository
2662+ *
26492663 * @return ProductLinkRepositoryInterface
26502664 */
26512665 private function getLinkRepository ()
@@ -2658,6 +2672,8 @@ private function getLinkRepository()
26582672 }
26592673
26602674 /**
2675+ * Get Media Gallery Processor
2676+ *
26612677 * @return Product\Gallery\Processor
26622678 */
26632679 private function getMediaGalleryProcessor ()
0 commit comments