Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Tests | 14 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
20 | 1 | public function exportContextData() |
|
21 | { |
||
22 | 1 | $dataWrapper = $this->getDataWrapper(); |
|
23 | 1 | $simpleCollection = []; |
|
24 | |||
25 | 1 | foreach ($dataWrapper->getSimpleCollection() as $simple) { |
|
26 | 1 | $simpleCollection[] = [ |
|
27 | 1 | 'sku' => $simple->getSku(), |
|
28 | 1 | 'partner_sku' => $simple->getPartnerSku(), |
|
29 | 1 | 'venture_product_id' => $simple->getVentureProductId() |
|
30 | 1 | ]; |
|
31 | 1 | } |
|
32 | |||
33 | 1 | return $this->prepareExport([ |
|
34 | 1 | 'sku' => $dataWrapper->getSku(), |
|
35 | 1 | 'partner_sku' => $dataWrapper->getPartnerSku(), |
|
36 | 'simple_collection' => $simpleCollection |
||
37 | 1 | ]); |
|
38 | } |
||
39 | } |
||
40 |