77use Akeneo \Connector \Helper \Store as StoreHelper ;
88use Akeneo \Connector \Helper \Config as ConfigHelper ;
99use Akeneo \Connector \Helper \Import \Product as ProductImportHelper ;
10+ use Exception ;
1011use Magento \Store \Model \ScopeInterface as scope ;
1112use Magento \Framework \Serialize \Serializer \Json ;
1213use Magento \Framework \App \Config \ScopeConfigInterface ;
13- use Magento \Eav \Model \Config as EavConfig ;
1414
1515class SetTaxClassId
1616{
1717 protected $ entitiesHelper ;
18+ protected $ storeHelper ;
19+ protected $ serializer ;
1820 protected $ configHelper ;
21+ protected $ authenticator ;
1922 protected $ scopeConfig ;
2023 protected $ tax_id_columns ;
21- protected $ storeHelper ;
22- protected $ serializer ;
2324
2425 /**
2526 * @param ProductImportHelper $entitiesHelper
@@ -28,7 +29,6 @@ class SetTaxClassId
2829 * @param ConfigHelper $configHelper
2930 * @param Authenticator $authenticator
3031 * @param ScopeConfigInterface $scopeConfig
31- * @param EavConfig $eavConfig
3232 */
3333 public function __construct (
3434 ProductImportHelper $ entitiesHelper ,
@@ -37,15 +37,13 @@ public function __construct(
3737 ConfigHelper $ configHelper ,
3838 Authenticator $ authenticator ,
3939 ScopeConfigInterface $ scopeConfig ,
40- EavConfig $ eavConfig
4140 ) {
4241 $ this ->entitiesHelper = $ entitiesHelper ;
4342 $ this ->storeHelper = $ storeHelper ;
4443 $ this ->serializer = $ serializer ;
4544 $ this ->configHelper = $ configHelper ;
4645 $ this ->authenticator = $ authenticator ;
4746 $ this ->scopeConfig = $ scopeConfig ;
48- $ this ->eavConfig = $ eavConfig ;
4947 }
5048
5149 /**
@@ -185,7 +183,7 @@ public function checkTaxColumnsExist($mappings, $tmpTable)
185183 /** @var AdapterInterface $connection */
186184 $ connection = $ this ->entitiesHelper ->getConnection ();
187185
188- foreach ($ mappings as $ key => $ mapping ) {
186+ foreach ($ mappings as $ mapping ) {
189187
190188 $ akeneoAttribute = $ this ->authenticator ->getAkeneoApiClient ()->getAttributeApi ()->get ($ mapping );
191189
@@ -197,7 +195,7 @@ public function checkTaxColumnsExist($mappings, $tmpTable)
197195
198196 if (isset ($ akeneoAttribute ['localizable ' ])) {
199197 $ mappedChannels = $ this ->configHelper ->getMappedChannels ();
200- foreach ($ mappedChannels as $ key => $ channel ) {
198+ foreach ($ mappedChannels as $ channel ) {
201199 foreach ($ this ->storeHelper ->getChannelStoreLangs ($ channel ) as $ locale ) {
202200 if ($ connection ->tableColumnExists ($ tmpTable , $ mapping . '- ' . $ locale . '- ' . $ channel )) {
203201 $ newMappings [] = $ mapping . '- ' . $ locale . '- ' . $ channel ;
0 commit comments