1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace SprykerEco\Zed\Computop\Persistence\Propel\Mapper; |
4
|
|
|
|
5
|
|
|
use Generated\Shared\Transfer\ComputopPaymentComputopTransfer; |
|
|
|
|
6
|
|
|
use Generated\Shared\Transfer\ComputopSalesOrderItemCollectionTransfer; |
|
|
|
|
7
|
|
|
use Generated\Shared\Transfer\ComputopSalesOrderItemTransfer; |
|
|
|
|
8
|
|
|
use Orm\Zed\Computop\Persistence\SpyPaymentComputop; |
|
|
|
|
9
|
|
|
use Orm\Zed\Sales\Persistence\SpySalesOrderItem; |
|
|
|
|
10
|
|
|
use Propel\Runtime\Collection\Collection; |
11
|
|
|
|
12
|
|
|
class ComputopMapper |
13
|
|
|
{ |
14
|
|
|
/** |
15
|
|
|
* @param SpyPaymentComputop $computopPaymentEntity |
16
|
|
|
* @param ComputopPaymentComputopTransfer $computopPaymentTransfer |
17
|
|
|
* @return ComputopPaymentComputopTransfer |
18
|
|
|
*/ |
19
|
|
|
public function mapComputopPaymentEntityToComputopPaymentTransfer( |
20
|
|
|
SpyPaymentComputop $computopPaymentEntity, |
21
|
|
|
ComputopPaymentComputopTransfer $computopPaymentTransfer |
22
|
|
|
): ComputopPaymentComputopTransfer |
23
|
|
|
{ |
24
|
|
|
$computopPaymentTransfer->fromArray($computopPaymentEntity->toArray(), true); |
25
|
|
|
|
26
|
|
|
return $computopPaymentTransfer; |
27
|
|
|
} |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* @param Collection $salesOrderItemsCollection |
31
|
|
|
* @param ComputopSalesOrderItemCollectionTransfer $computopSalesOrderItemCollectionTransfer |
32
|
|
|
* |
33
|
|
|
* @return ComputopSalesOrderItemCollectionTransfer[] |
34
|
|
|
*/ |
35
|
|
|
public function mapSalesOrderItemsCollectionToComputopSalesOrderItemCollectionTransfer( |
36
|
|
|
Collection $salesOrderItemsCollection, |
37
|
|
|
ComputopSalesOrderItemCollectionTransfer $computopSalesOrderItemCollectionTransfer |
|
|
|
|
38
|
|
|
): array |
39
|
|
|
{ |
40
|
|
|
$computopSalesOrderItemCollectionTransfers = []; |
41
|
|
|
foreach ($salesOrderItemsCollection as $salesOrderItem) { |
42
|
|
|
$computopSalesOrderItemTransfer = $this-> |
43
|
|
|
mapSalesOrderItemToComputopSalesOrderItemTransfer($salesOrderItem, new ComputopSalesOrderItemTransfer()); |
44
|
|
|
$computopSalesOrderItemCollectionTransfers[] = $computopSalesOrderItemTransfer; |
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
return $computopSalesOrderItemCollectionTransfers; |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @param SpySalesOrderItem $salesOrderItem |
52
|
|
|
* @param ComputopSalesOrderItemTransfer $computopSalesOrderItemTransfer |
53
|
|
|
* |
54
|
|
|
* @return ComputopSalesOrderItemTransfer |
55
|
|
|
*/ |
56
|
|
|
public function mapSalesOrderItemToComputopSalesOrderItemTransfer( |
57
|
|
|
SpySalesOrderItem $salesOrderItem, |
58
|
|
|
ComputopSalesOrderItemTransfer $computopSalesOrderItemTransfer |
59
|
|
|
): ComputopSalesOrderItemTransfer |
60
|
|
|
{ |
61
|
|
|
$computopSalesOrderItemTransfer->fromArray($salesOrderItem->toArray(), true); |
62
|
|
|
|
63
|
|
|
return $computopSalesOrderItemTransfer; |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
public function map() |
67
|
|
|
{ |
68
|
|
|
|
69
|
|
|
} |
70
|
|
|
} |
71
|
|
|
|
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