diff --git a/app/code/Magento/BundleImportExport/Model/Export/RowCustomizer.php b/app/code/Magento/BundleImportExport/Model/Export/RowCustomizer.php index 24ccbbee23649908163750b13795d9302ead3b1a..840accf098c4d0d77723d38866d115e776ec4d65 100644 --- a/app/code/Magento/BundleImportExport/Model/Export/RowCustomizer.php +++ b/app/code/Magento/BundleImportExport/Model/Export/RowCustomizer.php @@ -294,7 +294,7 @@ class RowCustomizer implements RowCustomizerInterface * Retrieve option value of bundle product * * @param \Magento\Bundle\Model\Option $option - * @param array $optionTitles + * @param string[] $optionTitles * @return string */ protected function getFormattedOptionValues($option, $optionTitles = []) @@ -464,7 +464,7 @@ class RowCustomizer implements RowCustomizerInterface * @return \Magento\Bundle\Model\ResourceModel\Option\Collection */ private function getProductOptionCollections( - $product, + \Magento\Catalog\Model\Product $product, $storeId = \Magento\Store\Model\Store::DEFAULT_STORE_ID ): \Magento\Bundle\Model\ResourceModel\Option\Collection { $productSku = $product->getSku(); diff --git a/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php b/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php index b7f70d18f5c85209da0f64579778774b54e2b9b8..93d41c067b22991a598436710fa50afe62c78dae 100644 --- a/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php +++ b/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php @@ -726,10 +726,10 @@ class Bundle extends \Magento\CatalogImportExport\Model\Import\Product\Type\Abst /** * Get store id by store code. * - * @param string|null $storeCode + * @param string $storeCode * @return int */ - private function getStoreIdByCode($storeCode): int + private function getStoreIdByCode(string $storeCode): int { if (!isset($this->storeIdToCode[$storeCode])) { /** @var $store \Magento\Store\Model\Store */ diff --git a/app/code/Magento/CatalogImportExport/Model/Export/Product.php b/app/code/Magento/CatalogImportExport/Model/Export/Product.php index af14ef0bf6e8e2bf98fefd3443750f50144514b8..6a14eb8b7a817e393550eb6af82480fa785f9c8e 100644 --- a/app/code/Magento/CatalogImportExport/Model/Export/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Export/Product.php @@ -1385,7 +1385,7 @@ class Product extends \Magento\ImportExport\Model\Export\Entity\AbstractEntity if (Store::DEFAULT_STORE_ID === $storeId) { $row['required'] = $option['is_require']; $row['price'] = $option['price']; - $row['price_type'] = ($option['price_type'] == 'percent') ? $option['price_type'] : 'fixed'; + $row['price_type'] = ($option['price_type'] === 'percent') ? 'percent' : 'fixed'; $row['sku'] = $option['sku']; if ($option['max_characters']) { $row['max_characters'] = $option['max_characters']; @@ -1406,9 +1406,8 @@ class Product extends \Magento\ImportExport\Model\Export\Entity\AbstractEntity $row['option_title'] = $value['title']; if (Store::DEFAULT_STORE_ID === $storeId) { $row['option_title'] = $value['title']; - $valuePriceType = ($value['price_type'] == 'percent') ? $value['price_type'] : 'fixed'; $row['price'] = $value['price']; - $row['price_type'] = $valuePriceType; + $row['price_type'] = ($value['price_type'] === 'percent') ? 'percent' : 'fixed'; $row['sku'] = $value['sku']; } $customOptionsData[$productId][$storeId][] = $this->optionRowToCellString($row);