99use Magento \Catalog \Model \Product \Visibility ;
1010use Magento \CatalogImportExport \Model \Import \Product \RowValidatorInterface as ValidatorInterface ;
1111use Magento \Framework \App \Filesystem \DirectoryList ;
12+ use Magento \Framework \Exception \LocalizedException ;
1213use Magento \Framework \Filesystem ;
1314use Magento \Framework \Model \ResourceModel \Db \ObjectRelationProcessor ;
1415use Magento \Framework \Model \ResourceModel \Db \TransactionManagerInterface ;
@@ -712,7 +713,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
712713 * @param \Magento\CatalogInventory\Model\Spi\StockStateProviderInterface $stockStateProvider
713714 * @param \Magento\Catalog\Helper\Data $catalogData
714715 * @param \Magento\ImportExport\Model\Import\Config $importConfig
715- * @param Proxy\Product\ResourceFactory $resourceFactory
716+ * @param Proxy\Product\ResourceModelFactory $resourceFactory
716717 * @param Product\OptionFactory $optionFactory
717718 * @param \Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory $setColFactory
718719 * @param Product\Type\Factory $productTypeFactory
@@ -1084,12 +1085,12 @@ protected function _initTypeModels()
10841085 $ params = [$ this , $ productTypeName ];
10851086 if (!($ model = $ this ->_productTypeFactory ->create ($ productTypeConfig ['model ' ], ['params ' => $ params ]))
10861087 ) {
1087- throw new \ Magento \ Framework \ Exception \ LocalizedException (
1088+ throw new LocalizedException (
10881089 __ ('Entity type model \'%1 \' is not found ' , $ productTypeConfig ['model ' ])
10891090 );
10901091 }
10911092 if (!$ model instanceof \Magento \CatalogImportExport \Model \Import \Product \Type \AbstractType) {
1092- throw new \ Magento \ Framework \ Exception \ LocalizedException (
1093+ throw new LocalizedException (
10931094 __ (
10941095 'Entity type model must be an instance of '
10951096 . \Magento \CatalogImportExport \Model \Import \Product \Type \AbstractType::class
@@ -1551,6 +1552,7 @@ public function getImagesFromRow(array $rowData)
15511552 * @SuppressWarnings(PHPMD.NPathComplexity)
15521553 * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
15531554 * @SuppressWarnings(PHPMD.UnusedLocalVariable)
1555+ * @throws LocalizedException
15541556 */
15551557 protected function _saveProducts ()
15561558 {
@@ -1611,7 +1613,7 @@ protected function _saveProducts()
16111613
16121614 // wrong attribute_set_code was received
16131615 if (!$ attributeSetId ) {
1614- throw new \ Magento \ Framework \ Exception \ LocalizedException (
1616+ throw new LocalizedException (
16151617 __ (
16161618 'Wrong attribute set code "%1", please correct it and try again. ' ,
16171619 $ rowData ['attribute_set_code ' ]
@@ -1998,7 +2000,7 @@ protected function _getUploader()
19982000 }
19992001
20002002 if (!$ this ->_fileUploader ->setTmpDir ($ tmpPath )) {
2001- throw new \ Magento \ Framework \ Exception \ LocalizedException (
2003+ throw new LocalizedException (
20022004 __ ('File directory \'%1 \' is not readable. ' , $ tmpPath )
20032005 );
20042006 }
@@ -2007,7 +2009,7 @@ protected function _getUploader()
20072009
20082010 $ this ->_mediaDirectory ->create ($ destinationPath );
20092011 if (!$ this ->_fileUploader ->setDestDir ($ destinationPath )) {
2010- throw new \ Magento \ Framework \ Exception \ LocalizedException (
2012+ throw new LocalizedException (
20112013 __ ('File directory \'%1 \' is not writable. ' , $ destinationPath )
20122014 );
20132015 }
@@ -2029,6 +2031,7 @@ public function getUploader()
20292031 * Return a new file name if the same file is already exists.
20302032 *
20312033 * @param string $fileName
2034+ * @param bool $renameFileOff
20322035 * @return string
20332036 */
20342037 protected function uploadMediaFiles ($ fileName , $ renameFileOff = false )
@@ -2753,9 +2756,7 @@ private function _customFieldsMapping($rowData)
27532756 }
27542757
27552758 /**
2756- * Validate data rows and save bunches to DB
2757- *
2758- * @return $this
2759+ * {@inheritdoc}
27592760 */
27602761 protected function _saveValidatedBunches ()
27612762 {
0 commit comments