Conditions | 2 |
Paths | 2 |
Total Lines | 25 |
Lines | 0 |
Ratio | 0 % |
Tests | 20 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
20 | 1 | public function exportContextData() |
|
21 | { |
||
22 | 1 | $dataWrapper = $this->getDataWrapper(); |
|
23 | 1 | $itemCollection = []; |
|
24 | |||
25 | 1 | foreach ($dataWrapper->getItemCollection() as $item) { |
|
26 | 1 | $itemCollection[] = [ |
|
27 | 1 | 'id' => $item->getId(), |
|
28 | 1 | 'venture_id' => $item->getVentureId(), |
|
29 | 1 | 'sku' => $item->getSku(), |
|
30 | 1 | 'status' => $item->getStatus(), |
|
31 | 1 | 'reason' => $item->getReason(), |
|
32 | 1 | 'reason_detail' => $item->getReasonDetail() |
|
33 | 1 | ]; |
|
34 | 1 | } |
|
35 | |||
36 | 1 | return $this->prepareExport([ |
|
37 | 1 | 'order_nr' => $dataWrapper->getOrderNr(), |
|
38 | 1 | 'venture_order_nr' => $dataWrapper->getVentureOrderNr(), |
|
39 | 1 | 'status' => $dataWrapper->getStatus(), |
|
40 | 1 | 'reason' => $dataWrapper->getReason(), |
|
41 | 1 | 'reason_detail' => $dataWrapper->getReasonDetail(), |
|
42 | 'item_collection' => $itemCollection |
||
43 | 1 | ]); |
|
44 | } |
||
45 | } |
||
46 |