-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7900 from magento-l3/PR_21_SEP_2022
[Chaika] BugFix delivery
- Loading branch information
Showing
8 changed files
with
123 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
app/code/Magento/CatalogImportExport/Model/StockItemProcessor.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\CatalogImportExport\Model; | ||
|
||
class StockItemProcessor implements StockItemProcessorInterface | ||
{ | ||
/** | ||
* @var StockItemImporterInterface | ||
*/ | ||
private $stockItemImporter; | ||
|
||
/** | ||
* @param StockItemImporterInterface $stockItemImporter | ||
*/ | ||
public function __construct( | ||
StockItemImporterInterface $stockItemImporter | ||
) { | ||
$this->stockItemImporter = $stockItemImporter; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function process(array $stockData, array $importedData): void | ||
{ | ||
$this->stockItemImporter->import($stockData); | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
app/code/Magento/CatalogImportExport/Model/StockItemProcessorInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\CatalogImportExport\Model; | ||
|
||
use Magento\Framework\Exception\CouldNotSaveException; | ||
use Magento\Framework\Exception\InputException; | ||
use Magento\Framework\Validation\ValidationException; | ||
|
||
interface StockItemProcessorInterface | ||
{ | ||
/** | ||
* Handle Import of Stock Item Data | ||
* | ||
* @param array $stockData | ||
* @param array $importedData | ||
* @return void | ||
* @throws CouldNotSaveException | ||
* @throws InputException | ||
* @throws ValidationException | ||
*/ | ||
public function process(array $stockData, array $importedData): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters