Delete   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 24
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A exportContextData() 0 18 2
1
<?php
2
3
namespace GFG\DTOMarketplace\Context\Venture\Product;
4
5
class Delete extends Update
6
{
7
    /**
8
     * {@inheritdoc}
9
     */
10
    public function exportContextData()
11
    {
12
        $dataWrapper      = $this->getDataWrapper();
13
        $simpleCollection = [];
14
15
        foreach ($dataWrapper->getSimpleCollection() as $simple) {
16
            $simpleCollection[] = [
17
                'sku'    => $simple->getSku(),
18
                'status' => $simple->getStatus()
19
            ];
20
        }
21
22
        return $this->prepareExport([
23
            'sku'               => $dataWrapper->getSku(),
24
            'status'            => $dataWrapper->getStatus(),
25
            'simple_collection' => $simpleCollection
26
        ]);
27
    }
28
}
29