@@ -39,9 +39,9 @@ class CostStorage implements \Magento\Catalog\Api\CostStorageInterface
39
39
private $ validationResult ;
40
40
41
41
/**
42
- * @var \Magento\Catalog\Model\Product\Price\InvalidSkuChecker
42
+ * @var \Magento\Catalog\Model\Product\Price\Validation\InvalidSkuProcessor
43
43
*/
44
- private $ invalidSkuChecker ;
44
+ private $ invalidSkuProcessor ;
45
45
46
46
/**
47
47
* Allowed product types.
@@ -68,7 +68,7 @@ class CostStorage implements \Magento\Catalog\Api\CostStorageInterface
68
68
* @param \Magento\Catalog\Model\ProductIdLocatorInterface $productIdLocator
69
69
* @param \Magento\Store\Api\StoreRepositoryInterface $storeRepository
70
70
* @param \Magento\Catalog\Model\Product\Price\Validation\Result $validationResult
71
- * @param \Magento\Catalog\Model\Product\Price\InvalidSkuChecker $invalidSkuChecker
71
+ * @param \Magento\Catalog\Model\Product\Price\Validation\InvalidSkuProcessor $invalidSkuProcessor
72
72
* @param array $allowedProductTypes [optional]
73
73
*/
74
74
public function __construct (
@@ -77,15 +77,15 @@ public function __construct(
77
77
\Magento \Catalog \Model \ProductIdLocatorInterface $ productIdLocator ,
78
78
\Magento \Store \Api \StoreRepositoryInterface $ storeRepository ,
79
79
\Magento \Catalog \Model \Product \Price \Validation \Result $ validationResult ,
80
- \Magento \Catalog \Model \Product \Price \InvalidSkuChecker $ invalidSkuChecker ,
80
+ \Magento \Catalog \Model \Product \Price \Validation \ InvalidSkuProcessor $ invalidSkuProcessor ,
81
81
array $ allowedProductTypes = []
82
82
) {
83
83
$ this ->pricePersistenceFactory = $ pricePersistenceFactory ;
84
84
$ this ->costInterfaceFactory = $ costInterfaceFactory ;
85
85
$ this ->productIdLocator = $ productIdLocator ;
86
86
$ this ->storeRepository = $ storeRepository ;
87
87
$ this ->validationResult = $ validationResult ;
88
- $ this ->invalidSkuChecker = $ invalidSkuChecker ;
88
+ $ this ->invalidSkuProcessor = $ invalidSkuProcessor ;
89
89
$ this ->allowedProductTypes = $ allowedProductTypes ;
90
90
}
91
91
@@ -94,7 +94,7 @@ public function __construct(
94
94
*/
95
95
public function get (array $ skus )
96
96
{
97
- $ this ->invalidSkuChecker -> isSkuListValid ($ skus , $ this ->allowedProductTypes );
97
+ $ skus = $ this ->invalidSkuProcessor -> filterSkuList ($ skus , $ this ->allowedProductTypes );
98
98
$ rawPrices = $ this ->getPricePersistence ()->get ($ skus );
99
99
$ prices = [];
100
100
foreach ($ rawPrices as $ rawPrice ) {
@@ -140,7 +140,7 @@ public function update(array $prices)
140
140
*/
141
141
public function delete (array $ skus )
142
142
{
143
- $ this ->invalidSkuChecker -> isSkuListValid ($ skus , $ this ->allowedProductTypes );
143
+ $ skus = $ this ->invalidSkuProcessor -> filterSkuList ($ skus , $ this ->allowedProductTypes );
144
144
$ this ->getPricePersistence ()->delete ($ skus );
145
145
146
146
return true ;
@@ -173,7 +173,7 @@ private function retrieveValidPrices(array $prices)
173
173
return $ price ->getSku ();
174
174
}, $ prices )
175
175
);
176
- $ invalidSkus = $ this ->invalidSkuChecker ->retrieveInvalidSkuList ($ skus , $ this ->allowedProductTypes );
176
+ $ invalidSkus = $ this ->invalidSkuProcessor ->retrieveInvalidSkuList ($ skus , $ this ->allowedProductTypes );
177
177
178
178
foreach ($ prices as $ id => $ price ) {
179
179
if (!$ price ->getSku () || in_array ($ price ->getSku (), $ invalidSkus )) {
0 commit comments