|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. |
|
5
|
|
|
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. |
|
6
|
|
|
*/ |
|
7
|
|
|
|
|
8
|
|
|
namespace SprykerEco\Zed\AkeneoPimMiddlewareConnector\Business\Mapper\Map; |
|
9
|
|
|
|
|
10
|
|
|
use SprykerEco\Zed\AkeneoPimMiddlewareConnector\AkeneoPimMiddlewareConnectorConfig; |
|
11
|
|
|
use SprykerMiddleware\Zed\Process\Business\Mapper\Map\AbstractMap; |
|
|
|
|
|
|
12
|
|
|
use SprykerMiddleware\Zed\Process\Business\Mapper\Map\MapInterface; |
|
|
|
|
|
|
13
|
|
|
|
|
14
|
|
|
class ProductModelImportMap extends AbstractMap |
|
15
|
|
|
{ |
|
16
|
|
|
/** |
|
17
|
|
|
* @var \SprykerEco\Zed\AkeneoPimMiddlewareConnector\AkeneoPimMiddlewareConnectorConfig |
|
18
|
|
|
*/ |
|
19
|
|
|
private $config; |
|
20
|
|
|
|
|
21
|
|
|
/** |
|
22
|
|
|
* @param \SprykerEco\Zed\AkeneoPimMiddlewareConnector\AkeneoPimMiddlewareConnectorConfig $config |
|
23
|
|
|
*/ |
|
24
|
|
|
public function __construct(AkeneoPimMiddlewareConnectorConfig $config) |
|
25
|
|
|
{ |
|
26
|
|
|
$this->config = $config; |
|
27
|
|
|
} |
|
28
|
|
|
|
|
29
|
|
|
/** |
|
30
|
|
|
* @return array |
|
31
|
|
|
*/ |
|
32
|
|
|
public function getMap(): array |
|
33
|
|
|
{ |
|
34
|
|
|
return [ |
|
35
|
|
|
'taxSetName' => function ($item) { |
|
|
|
|
|
|
36
|
|
|
return $this->config->getTaxSet(); |
|
37
|
|
|
}, |
|
38
|
|
|
'new_from' => function ($item) { |
|
|
|
|
|
|
39
|
|
|
return null; |
|
40
|
|
|
}, |
|
41
|
|
|
'new_to' => function ($item) { |
|
|
|
|
|
|
42
|
|
|
return null; |
|
43
|
|
|
}, |
|
44
|
|
|
'category_product_order' => function ($item) { |
|
|
|
|
|
|
45
|
|
|
return 0; |
|
46
|
|
|
}, |
|
47
|
|
|
'abstract_sku' => 'code', |
|
48
|
|
|
'category_key' => 'categories', |
|
49
|
|
|
'is_active' => 'enabled', |
|
50
|
|
|
|
|
51
|
|
|
'attributes' => [ |
|
52
|
|
|
'values.attributes', |
|
53
|
|
|
], |
|
54
|
|
|
'localizedAttributes' => [ |
|
55
|
|
|
'values.localizedAttributes', |
|
56
|
|
|
], |
|
57
|
|
|
'color_code' => function ($item) { |
|
|
|
|
|
|
58
|
|
|
return ''; |
|
59
|
|
|
}, |
|
60
|
|
|
'stores' => function ($item) { |
|
|
|
|
|
|
61
|
|
|
return $this->config->getActiveStoresForProducts(); |
|
62
|
|
|
}, |
|
63
|
|
|
]; |
|
64
|
|
|
} |
|
65
|
|
|
|
|
66
|
|
|
/** |
|
67
|
|
|
* @return string |
|
68
|
|
|
*/ |
|
69
|
|
|
public function getStrategy(): string |
|
70
|
|
|
{ |
|
71
|
|
|
return MapInterface::MAPPER_STRATEGY_SKIP_UNKNOWN; |
|
72
|
|
|
} |
|
73
|
|
|
} |
|
74
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths