1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* MIT License |
5
|
|
|
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. |
6
|
|
|
*/ |
7
|
|
|
|
8
|
|
|
namespace SprykerEco\Zed\Computop\Persistence; |
9
|
|
|
|
10
|
|
|
use Generated\Shared\Transfer\ComputopPaymentComputopDetailTransfer; |
|
|
|
|
11
|
|
|
use Generated\Shared\Transfer\ComputopPaymentComputopOrderItemCollectionTransfer; |
|
|
|
|
12
|
|
|
use Generated\Shared\Transfer\ComputopPaymentComputopTransfer; |
|
|
|
|
13
|
|
|
use Generated\Shared\Transfer\ComputopSalesOrderItemCollectionTransfer; |
|
|
|
|
14
|
|
|
use Spryker\Zed\Kernel\Persistence\AbstractRepository; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* @method \SprykerEco\Zed\Computop\Persistence\ComputopPersistenceFactory getFactory(); |
18
|
|
|
*/ |
19
|
|
|
class ComputopRepository extends AbstractRepository implements ComputopRepositoryInterface |
20
|
|
|
{ |
21
|
|
|
/** |
22
|
|
|
* @inheritDoc |
23
|
|
|
*/ |
24
|
|
|
public function getComputopPaymentByComputopTransId(string $transactionId): ComputopPaymentComputopTransfer |
25
|
|
|
{ |
26
|
|
|
$paymentComputopQuery = $this->getFactory()->createPaymentComputopQuery(); |
27
|
|
|
$computopPaymentEntity = $paymentComputopQuery->filterByTransId($transactionId)->findOne(); |
28
|
|
|
$computopPaymentTransfer = new ComputopPaymentComputopTransfer(); |
29
|
|
|
|
30
|
|
|
if ($computopPaymentEntity === null) { |
31
|
|
|
return $computopPaymentTransfer; |
32
|
|
|
} |
33
|
|
|
|
34
|
|
|
return $this->getFactory() |
35
|
|
|
->createComputopEntityMapper() |
36
|
|
|
->mapComputopPaymentEntityToComputopPaymentTransfer($computopPaymentEntity, $computopPaymentTransfer); |
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* @param \Generated\Shared\Transfer\ComputopPaymentComputopTransfer $computopPaymentComputopTransfer |
41
|
|
|
* |
42
|
|
|
* @return \Generated\Shared\Transfer\ComputopSalesOrderItemCollectionTransfer |
43
|
|
|
*/ |
44
|
|
|
public function getComputopSalesOrderItemsCollection( |
45
|
|
|
ComputopPaymentComputopTransfer $computopPaymentComputopTransfer |
46
|
|
|
): ComputopSalesOrderItemCollectionTransfer { |
47
|
|
|
$salesOrderItemsCollection = $this |
48
|
|
|
->getFactory()->createSpySalesOrderItemQuery() |
49
|
|
|
->filterByIdSalesOrderItem($computopPaymentComputopTransfer->getFKSalesOrder()) |
50
|
|
|
->find(); |
51
|
|
|
|
52
|
|
|
$computopSalesOrderItemCollectionTransfer = $this->getFactory() |
53
|
|
|
->createComputopEntityMapper() |
54
|
|
|
->mapSalesOrderItemsCollectionToComputopSalesOrderItemCollectionTransfer( |
55
|
|
|
$salesOrderItemsCollection, |
56
|
|
|
new ComputopSalesOrderItemCollectionTransfer() |
57
|
|
|
); |
58
|
|
|
|
59
|
|
|
return $computopSalesOrderItemCollectionTransfer; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @param \Generated\Shared\Transfer\ComputopPaymentComputopTransfer $computopPaymentComputopTransfer |
64
|
|
|
* |
65
|
|
|
* @return \Generated\Shared\Transfer\ComputopPaymentComputopOrderItemCollectionTransfer |
66
|
|
|
*/ |
67
|
|
|
public function getComputopPaymentComputopOrderItemsCollection( |
68
|
|
|
ComputopPaymentComputopTransfer $computopPaymentComputopTransfer |
69
|
|
|
): ComputopPaymentComputopOrderItemCollectionTransfer { |
70
|
|
|
$computopPaymentComputopOrderItemsEntityCollection = $this->getFactory() |
71
|
|
|
->createPaymentComputopOrderItemQuery() |
72
|
|
|
->filterByFkPaymentComputop($computopPaymentComputopTransfer->getIdPaymentComputop()) |
73
|
|
|
->find(); |
74
|
|
|
|
75
|
|
|
$computopPaymentComputopOrderItemsCollectionTransfer = $this->getFactory() |
76
|
|
|
->createComputopEntityMapper() |
77
|
|
|
->mapPaymentComputopOrderItemEntityCollectionToComputopPaymentComputopOrderItemTransferCollection( |
78
|
|
|
$computopPaymentComputopOrderItemsEntityCollection, |
79
|
|
|
new ComputopPaymentComputopOrderItemCollectionTransfer() |
80
|
|
|
); |
81
|
|
|
|
82
|
|
|
return $computopPaymentComputopOrderItemsCollectionTransfer; |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* @param \Generated\Shared\Transfer\ComputopPaymentComputopTransfer $computopPaymentComputopTransfer |
87
|
|
|
* |
88
|
|
|
* @return \Generated\Shared\Transfer\ComputopPaymentComputopDetailTransfer |
89
|
|
|
*/ |
90
|
|
|
public function getComputopPaymentDetail( |
91
|
|
|
ComputopPaymentComputopTransfer $computopPaymentComputopTransfer |
92
|
|
|
): ComputopPaymentComputopDetailTransfer { |
93
|
|
|
$paymentComputopDetailEntity = $this->getFactory() |
94
|
|
|
->createPaymentComputopDetailQuery() |
95
|
|
|
->filterByIdPaymentComputop($computopPaymentComputopTransfer->getIdPaymentComputop()) |
96
|
|
|
->findOne(); |
97
|
|
|
|
98
|
|
|
return $this->getFactory() |
99
|
|
|
->createComputopEntityMapper() |
100
|
|
|
->mapPaymentComputopDetailEntityToComputopPaymentComputopDetailTransfer( |
101
|
|
|
$paymentComputopDetailEntity, |
102
|
|
|
new ComputopPaymentComputopDetailTransfer() |
103
|
|
|
); |
104
|
|
|
} |
105
|
|
|
} |
106
|
|
|
|
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