|
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\PunchoutCatalogs\Persistence\Propel\Mapper; |
|
9
|
|
|
|
|
10
|
|
|
use Generated\Shared\Transfer\PunchoutCatalogConnectionCartTransfer; |
|
|
|
|
|
|
11
|
|
|
use Generated\Shared\Transfer\PunchoutCatalogConnectionSetupTransfer; |
|
|
|
|
|
|
12
|
|
|
use Generated\Shared\Transfer\PunchoutCatalogConnectionTransfer; |
|
|
|
|
|
|
13
|
|
|
use Generated\Shared\Transfer\PunchoutCatalogTransactionTransfer; |
|
|
|
|
|
|
14
|
|
|
use Orm\Zed\PunchoutCatalog\Persistence\PgwPunchoutCatalogConnection; |
|
|
|
|
|
|
15
|
|
|
use Orm\Zed\PunchoutCatalog\Persistence\PgwPunchoutCatalogTransaction; |
|
|
|
|
|
|
16
|
|
|
|
|
17
|
|
|
class PunchoutCatalogsConnectionMapper |
|
18
|
|
|
{ |
|
19
|
|
|
/** |
|
20
|
|
|
* @var \SprykerEco\Zed\PunchoutCatalogs\Persistence\Propel\Mapper\PunchoutCatalogsConnectionSetupMapper |
|
21
|
|
|
*/ |
|
22
|
|
|
protected $punchoutCatalogConnectionSetupMapper; |
|
23
|
|
|
|
|
24
|
|
|
/** |
|
25
|
|
|
* @var \SprykerEco\Zed\PunchoutCatalogs\Persistence\Propel\Mapper\PunchoutCatalogsConnectionCartMapper |
|
26
|
|
|
*/ |
|
27
|
|
|
protected $punchoutCatalogConnectionCartMapper; |
|
28
|
|
|
|
|
29
|
|
|
/** |
|
30
|
|
|
* @param \SprykerEco\Zed\PunchoutCatalogs\Persistence\Propel\Mapper\PunchoutCatalogsConnectionSetupMapper $punchoutCatalogConnectionSetupMapper |
|
31
|
|
|
* @param \SprykerEco\Zed\PunchoutCatalogs\Persistence\Propel\Mapper\PunchoutCatalogsConnectionCartMapper $punchoutCatalogConnectionCartMapper |
|
32
|
|
|
*/ |
|
33
|
|
|
public function __construct(PunchoutCatalogsConnectionSetupMapper $punchoutCatalogConnectionSetupMapper, PunchoutCatalogsConnectionCartMapper $punchoutCatalogConnectionCartMapper) |
|
34
|
|
|
{ |
|
35
|
|
|
$this->punchoutCatalogConnectionSetupMapper = $punchoutCatalogConnectionSetupMapper; |
|
36
|
|
|
$this->punchoutCatalogConnectionCartMapper = $punchoutCatalogConnectionCartMapper; |
|
37
|
|
|
} |
|
38
|
|
|
|
|
39
|
|
|
/** |
|
40
|
|
|
* @param \Generated\Shared\Transfer\PunchoutCatalogConnectionTransfer $punchoutCatalogConnectionTransfer |
|
41
|
|
|
* @param \Orm\Zed\PunchoutCatalog\Persistence\PgwPunchoutCatalogConnection $punchoutCatalogConnectionEntity |
|
42
|
|
|
* |
|
43
|
|
|
* @return \Orm\Zed\PunchoutCatalog\Persistence\PgwPunchoutCatalogConnection |
|
44
|
|
|
*/ |
|
45
|
|
|
public function mapPunchoutCatalogConnectionTransferToEntity( |
|
46
|
|
|
PunchoutCatalogConnectionTransfer $punchoutCatalogConnectionTransfer, |
|
47
|
|
|
PgwPunchoutCatalogConnection $punchoutCatalogConnectionEntity |
|
48
|
|
|
): PgwPunchoutCatalogConnection { |
|
49
|
|
|
$punchoutCatalogConnectionEntity->fromArray($punchoutCatalogConnectionTransfer->toArray()); |
|
50
|
|
|
|
|
51
|
|
|
return $punchoutCatalogConnectionEntity; |
|
52
|
|
|
} |
|
53
|
|
|
|
|
54
|
|
|
/** |
|
55
|
|
|
* @param \Orm\Zed\PunchoutCatalog\Persistence\PgwPunchoutCatalogConnection $punchoutCatalogConnectionEntity |
|
56
|
|
|
* @param \Generated\Shared\Transfer\PunchoutCatalogConnectionTransfer $punchoutCatalogConnectionTransfer |
|
57
|
|
|
* |
|
58
|
|
|
* @return \Generated\Shared\Transfer\PunchoutCatalogConnectionTransfer |
|
59
|
|
|
*/ |
|
60
|
|
|
public function mapPunchoutCatalogConnectionEntityToTransfer( |
|
61
|
|
|
PgwPunchoutCatalogConnection $punchoutCatalogConnectionEntity, |
|
62
|
|
|
PunchoutCatalogConnectionTransfer $punchoutCatalogConnectionTransfer |
|
63
|
|
|
): PunchoutCatalogConnectionTransfer { |
|
64
|
|
|
$punchoutCatalogConnectionTransfer->fromArray($punchoutCatalogConnectionEntity->toArray(), true); |
|
65
|
|
|
|
|
66
|
|
|
if ($punchoutCatalogConnectionEntity->getPgwPunchoutCatalogConnectionSetup()) { |
|
67
|
|
|
$punchoutCatalogConnectionTransfer->setSetup( |
|
68
|
|
|
$this->punchoutCatalogConnectionSetupMapper->mapPunchoutCatalogConnectionSetupEntityToTransfer( |
|
69
|
|
|
$punchoutCatalogConnectionEntity->getPgwPunchoutCatalogConnectionSetup(), |
|
70
|
|
|
new PunchoutCatalogConnectionSetupTransfer() |
|
71
|
|
|
) |
|
72
|
|
|
); |
|
73
|
|
|
} |
|
74
|
|
|
|
|
75
|
|
|
if ($punchoutCatalogConnectionEntity->getPgwPunchoutCatalogConnectionCart()) { |
|
76
|
|
|
$punchoutCatalogConnectionTransfer->setCart( |
|
77
|
|
|
$this->punchoutCatalogConnectionCartMapper->mapPunchoutCatalogConnectionCartEntityToTransfer( |
|
78
|
|
|
$punchoutCatalogConnectionEntity->getPgwPunchoutCatalogConnectionCart(), |
|
79
|
|
|
new PunchoutCatalogConnectionCartTransfer() |
|
80
|
|
|
) |
|
81
|
|
|
); |
|
82
|
|
|
} |
|
83
|
|
|
|
|
84
|
|
|
return $punchoutCatalogConnectionTransfer; |
|
85
|
|
|
} |
|
86
|
|
|
|
|
87
|
|
|
/** |
|
88
|
|
|
* @param \Orm\Zed\PunchoutCatalog\Persistence\PgwPunchoutCatalogTransaction $punchoutCatalogTransaction |
|
89
|
|
|
* @param \Generated\Shared\Transfer\PunchoutCatalogTransactionTransfer $punchoutCatalogTransactionTransfer |
|
90
|
|
|
* |
|
91
|
|
|
* @return \Generated\Shared\Transfer\PunchoutCatalogTransactionTransfer |
|
92
|
|
|
*/ |
|
93
|
|
|
public function mapPunchoutCatalogTransactionEntityToTransfer( |
|
94
|
|
|
PgwPunchoutCatalogTransaction $punchoutCatalogTransaction, |
|
95
|
|
|
PunchoutCatalogTransactionTransfer $punchoutCatalogTransactionTransfer |
|
96
|
|
|
): PunchoutCatalogTransactionTransfer { |
|
97
|
|
|
$punchoutCatalogTransactionTransfer->fromArray($punchoutCatalogTransaction->toArray(), true); |
|
98
|
|
|
|
|
99
|
|
|
if ($punchoutCatalogTransaction->getPunchoutCatalogConnection()) { |
|
100
|
|
|
$punchoutCatalogTransactionTransfer->setConnection( |
|
101
|
|
|
$this->mapPunchoutCatalogConnectionEntityToTransfer( |
|
102
|
|
|
$punchoutCatalogTransaction->getPunchoutCatalogConnection(), |
|
103
|
|
|
new PunchoutCatalogConnectionTransfer() |
|
104
|
|
|
) |
|
105
|
|
|
); |
|
106
|
|
|
} |
|
107
|
|
|
|
|
108
|
|
|
return $punchoutCatalogTransactionTransfer; |
|
109
|
|
|
} |
|
110
|
|
|
} |
|
111
|
|
|
|
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