|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* MIT License |
|
5
|
|
|
* For full license information, please view the LICENSE file that was distributed with this source code. |
|
6
|
|
|
*/ |
|
7
|
|
|
|
|
8
|
|
|
namespace SprykerEco\Zed\Heidelpay\Persistence\Propel\Mapper; |
|
9
|
|
|
|
|
10
|
|
|
use Generated\Shared\Transfer\HeidelpayDirectDebitAccountTransfer; |
|
|
|
|
|
|
11
|
|
|
use Generated\Shared\Transfer\HeidelpayDirectDebitRegistrationTransfer; |
|
|
|
|
|
|
12
|
|
|
use Generated\Shared\Transfer\HeidelpayNotificationCollectionTransfer; |
|
|
|
|
|
|
13
|
|
|
use Generated\Shared\Transfer\HeidelpayNotificationTransfer; |
|
|
|
|
|
|
14
|
|
|
use Generated\Shared\Transfer\HeidelpayPaymentTransfer; |
|
|
|
|
|
|
15
|
|
|
use Generated\Shared\Transfer\HeidelpayTransactionLogTransfer; |
|
|
|
|
|
|
16
|
|
|
use Orm\Zed\Heidelpay\Persistence\SpyPaymentHeidelpay; |
|
|
|
|
|
|
17
|
|
|
use Orm\Zed\Heidelpay\Persistence\SpyPaymentHeidelpayDirectDebitRegistration; |
|
|
|
|
|
|
18
|
|
|
use Orm\Zed\Heidelpay\Persistence\SpyPaymentHeidelpayNotification; |
|
|
|
|
|
|
19
|
|
|
use Orm\Zed\Heidelpay\Persistence\SpyPaymentHeidelpayTransactionLog; |
|
|
|
|
|
|
20
|
|
|
use Propel\Runtime\Collection\ObjectCollection; |
|
21
|
|
|
|
|
22
|
|
|
class HeidelpayPersistenceMapper |
|
23
|
|
|
{ |
|
24
|
|
|
/** |
|
25
|
|
|
* @param \Orm\Zed\Heidelpay\Persistence\SpyPaymentHeidelpay $paymentHeidelpayEntity |
|
26
|
|
|
* @param \Generated\Shared\Transfer\HeidelpayPaymentTransfer $heidelpayPaymentTransfer |
|
27
|
|
|
* |
|
28
|
|
|
* @return \Generated\Shared\Transfer\HeidelpayPaymentTransfer |
|
29
|
|
|
*/ |
|
30
|
|
|
public function mapEntityToHeidelpayPaymentTransfer( |
|
31
|
|
|
SpyPaymentHeidelpay $paymentHeidelpayEntity, |
|
32
|
|
|
HeidelpayPaymentTransfer $heidelpayPaymentTransfer |
|
33
|
|
|
): HeidelpayPaymentTransfer { |
|
34
|
|
|
$heidelpayPaymentTransfer->fromArray( |
|
35
|
|
|
$paymentHeidelpayEntity->toArray(), |
|
36
|
|
|
true |
|
37
|
|
|
); |
|
38
|
|
|
|
|
39
|
|
|
return $heidelpayPaymentTransfer; |
|
40
|
|
|
} |
|
41
|
|
|
|
|
42
|
|
|
/** |
|
43
|
|
|
* @param \Propel\Runtime\Collection\ObjectCollection|\Orm\Zed\Heidelpay\Persistence\SpyPaymentHeidelpayNotification[] $paymentHeidelpayNotificationEntities |
|
44
|
|
|
* @param \Generated\Shared\Transfer\HeidelpayNotificationCollectionTransfer $heidelpayNotificationCollection |
|
45
|
|
|
* |
|
46
|
|
|
* @return \Generated\Shared\Transfer\HeidelpayNotificationCollectionTransfer |
|
47
|
|
|
*/ |
|
48
|
|
|
public function mapNotificationEntitiesToHeidelpayNotificationCollection( |
|
49
|
|
|
ObjectCollection $paymentHeidelpayNotificationEntities, |
|
50
|
|
|
HeidelpayNotificationCollectionTransfer $heidelpayNotificationCollection |
|
51
|
|
|
): HeidelpayNotificationCollectionTransfer { |
|
52
|
|
|
foreach ($paymentHeidelpayNotificationEntities as $paymentHeidelpayNotificationEntity) { |
|
53
|
|
|
$heidelpayNotificationTransfer = $this->mapEntityToHeidelpayNotificationTransfer( |
|
54
|
|
|
$paymentHeidelpayNotificationEntity, |
|
55
|
|
|
new HeidelpayNotificationTransfer() |
|
56
|
|
|
); |
|
57
|
|
|
$heidelpayNotificationCollection->addNotification($heidelpayNotificationTransfer); |
|
58
|
|
|
} |
|
59
|
|
|
|
|
60
|
|
|
return $heidelpayNotificationCollection; |
|
61
|
|
|
} |
|
62
|
|
|
|
|
63
|
|
|
/** |
|
64
|
|
|
* @param \Orm\Zed\Heidelpay\Persistence\SpyPaymentHeidelpayNotification $paymentHeidelpayNotificationEntity |
|
65
|
|
|
* @param \Generated\Shared\Transfer\HeidelpayNotificationTransfer $heidelpayNotificationTransfer |
|
66
|
|
|
* |
|
67
|
|
|
* @return \Generated\Shared\Transfer\HeidelpayNotificationTransfer |
|
68
|
|
|
*/ |
|
69
|
|
|
public function mapEntityToHeidelpayNotificationTransfer( |
|
70
|
|
|
SpyPaymentHeidelpayNotification $paymentHeidelpayNotificationEntity, |
|
71
|
|
|
HeidelpayNotificationTransfer $heidelpayNotificationTransfer |
|
72
|
|
|
): HeidelpayNotificationTransfer { |
|
73
|
|
|
$heidelpayNotificationTransfer->fromArray( |
|
74
|
|
|
$paymentHeidelpayNotificationEntity->toArray(), |
|
75
|
|
|
true |
|
76
|
|
|
); |
|
77
|
|
|
|
|
78
|
|
|
return $heidelpayNotificationTransfer; |
|
79
|
|
|
} |
|
80
|
|
|
|
|
81
|
|
|
/** |
|
82
|
|
|
* @param \Orm\Zed\Heidelpay\Persistence\SpyPaymentHeidelpayDirectDebitRegistration $paymentHeidelpayDirectDebitRegistrationEntity |
|
83
|
|
|
* @param \Generated\Shared\Transfer\HeidelpayDirectDebitRegistrationTransfer $directDebitRegistrationTransfer |
|
84
|
|
|
* |
|
85
|
|
|
* @return \Generated\Shared\Transfer\HeidelpayDirectDebitRegistrationTransfer |
|
86
|
|
|
*/ |
|
87
|
|
|
public function mapEntityToHeidelpayDirectDebitRegistrationTransfer( |
|
88
|
|
|
SpyPaymentHeidelpayDirectDebitRegistration $paymentHeidelpayDirectDebitRegistrationEntity, |
|
89
|
|
|
HeidelpayDirectDebitRegistrationTransfer $directDebitRegistrationTransfer |
|
90
|
|
|
): HeidelpayDirectDebitRegistrationTransfer { |
|
91
|
|
|
$directDebitRegistrationTransfer |
|
92
|
|
|
->setIdDirectDebitRegistration($paymentHeidelpayDirectDebitRegistrationEntity->getIdDirectDebitRegistration()) |
|
93
|
|
|
->setIdCustomerAddress($paymentHeidelpayDirectDebitRegistrationEntity->getFkCustomerAddress()) |
|
94
|
|
|
->setRegistrationUniqueId($paymentHeidelpayDirectDebitRegistrationEntity->getRegistrationUniqueId()) |
|
95
|
|
|
->setTransactionId($paymentHeidelpayDirectDebitRegistrationEntity->getTransactionId()) |
|
96
|
|
|
->setAccountInfo( |
|
97
|
|
|
(new HeidelpayDirectDebitAccountTransfer()) |
|
98
|
|
|
->fromArray( |
|
99
|
|
|
$paymentHeidelpayDirectDebitRegistrationEntity->toArray(), |
|
100
|
|
|
true |
|
101
|
|
|
) |
|
102
|
|
|
); |
|
103
|
|
|
|
|
104
|
|
|
return $directDebitRegistrationTransfer; |
|
105
|
|
|
} |
|
106
|
|
|
|
|
107
|
|
|
/** |
|
108
|
|
|
* @param \Orm\Zed\Heidelpay\Persistence\SpyPaymentHeidelpayTransactionLog $paymentHeidelpayTransactionLogEntity |
|
109
|
|
|
* @param \Generated\Shared\Transfer\HeidelpayTransactionLogTransfer $heidelpayTransactionLogTransfer |
|
110
|
|
|
* |
|
111
|
|
|
* @return \Generated\Shared\Transfer\HeidelpayTransactionLogTransfer |
|
112
|
|
|
*/ |
|
113
|
|
|
public function mapEntityToHeidelpayTransactionLogTransfer( |
|
114
|
|
|
SpyPaymentHeidelpayTransactionLog $paymentHeidelpayTransactionLogEntity, |
|
115
|
|
|
HeidelpayTransactionLogTransfer $heidelpayTransactionLogTransfer |
|
116
|
|
|
): HeidelpayTransactionLogTransfer { |
|
117
|
|
|
$heidelpayTransactionLogTransfer->fromArray( |
|
118
|
|
|
$paymentHeidelpayTransactionLogEntity->toArray(), |
|
119
|
|
|
true |
|
120
|
|
|
)->setIdSalesOrder($paymentHeidelpayTransactionLogEntity->getFkSalesOrder()); |
|
121
|
|
|
|
|
122
|
|
|
return $heidelpayTransactionLogTransfer; |
|
123
|
|
|
} |
|
124
|
|
|
} |
|
125
|
|
|
|
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