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\ComputopPaymentComputopOrderItemCollectionTransfer; |
|
|
|
|
11
|
|
|
use Generated\Shared\Transfer\ComputopPaymentComputopTransfer; |
|
|
|
|
12
|
|
|
use Generated\Shared\Transfer\ComputopSalesOrderItemCollectionTransfer; |
|
|
|
|
13
|
|
|
use Spryker\Zed\Kernel\Persistence\AbstractRepository; |
14
|
|
|
|
15
|
|
|
/** |
16
|
|
|
* @method \SprykerEco\Zed\Computop\Persistence\ComputopPersistenceFactory getFactory(); |
17
|
|
|
*/ |
18
|
|
|
class ComputopRepository extends AbstractRepository implements ComputopRepositoryInterface |
19
|
|
|
{ |
20
|
|
|
/** |
21
|
|
|
* @inheritDoc |
22
|
|
|
*/ |
23
|
|
|
public function getComputopPaymentByComputopTransId(string $transactionId): ComputopPaymentComputopTransfer |
24
|
|
|
{ |
25
|
|
|
$paymentComputopQuery = $this->getFactory()->createPaymentComputopQuery(); |
26
|
|
|
$computopPaymentEntity = $paymentComputopQuery->queryPaymentByTransactionId($transactionId)->findOne(); |
27
|
|
|
$computopPaymentTransfer = new ComputopPaymentComputopTransfer(); |
28
|
|
|
|
29
|
|
|
if ($computopPaymentEntity === null) { |
30
|
|
|
return $computopPaymentTransfer; |
31
|
|
|
} |
32
|
|
|
|
33
|
|
|
return $this->getFactory() |
34
|
|
|
->createComputopEntityMapper() |
35
|
|
|
->mapComputopPaymentEntityToComputopPaymentTransfer($computopPaymentEntity, $computopPaymentTransfer); |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @param \Generated\Shared\Transfer\ComputopPaymentComputopTransfer $computopPaymentComputopTransfer |
40
|
|
|
* |
41
|
|
|
* @return \Generated\Shared\Transfer\ComputopSalesOrderItemCollectionTransfer |
42
|
|
|
*/ |
43
|
|
|
public function getComputopSalesOrderItemsCollection( |
44
|
|
|
ComputopPaymentComputopTransfer $computopPaymentComputopTransfer |
45
|
|
|
): ComputopSalesOrderItemCollectionTransfer { |
46
|
|
|
$salesOrderItemsCollection = $this |
47
|
|
|
->getFactory()->createSpySalesOrderItemQuery() |
48
|
|
|
->getById($computopPaymentComputopTransfer->getFKSalesOrder()) |
49
|
|
|
->find(); |
50
|
|
|
|
51
|
|
|
$computopSalesOrderItemCollectionTransfer = $this->getFactory() |
52
|
|
|
->createComputopEntityMapper() |
53
|
|
|
->mapSalesOrderItemsCollectionToComputopSalesOrderItemCollectionTransfer( |
54
|
|
|
$salesOrderItemsCollection, |
55
|
|
|
new ComputopSalesOrderItemCollectionTransfer() |
56
|
|
|
); |
57
|
|
|
|
58
|
|
|
return $computopSalesOrderItemCollectionTransfer; |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* @param \Generated\Shared\Transfer\ComputopPaymentComputopTransfer $computopPaymentComputopTransfer |
63
|
|
|
* |
64
|
|
|
* @return \Generated\Shared\Transfer\ComputopPaymentComputopOrderItemCollectionTransfer |
65
|
|
|
*/ |
66
|
|
|
public function getComputopPaymentComputopOrderItemsCollection( |
67
|
|
|
ComputopPaymentComputopTransfer $computopPaymentComputopTransfer |
68
|
|
|
): ComputopPaymentComputopOrderItemCollectionTransfer { |
69
|
|
|
$computopPaymentComputopOrderItemsEntityCollection = $this->getFactory() |
70
|
|
|
->createPaymentComputopOrderItemQuery() |
71
|
|
|
->getByFkPaymentComputop($computopPaymentComputopTransfer->getFkPaymentComputop()) |
72
|
|
|
->find(); |
73
|
|
|
|
74
|
|
|
$computopPaymentComputopOrderItemsCollectionTransfer = $this->getFactory() |
75
|
|
|
->createComputopEntityMapper() |
76
|
|
|
->mapPaymentComputopOrderItemEntityCollectionToComputopPaymentComputopOrderItemTransferCollection( |
77
|
|
|
$computopPaymentComputopOrderItemsEntityCollection, |
78
|
|
|
new ComputopPaymentComputopOrderItemCollectionTransfer() |
79
|
|
|
); |
80
|
|
|
|
81
|
|
|
return $computopPaymentComputopOrderItemsCollectionTransfer; |
82
|
|
|
} |
83
|
|
|
} |
84
|
|
|
|
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