Passed
Push — master ( b784d6...77dce5 )
by Vitor de
16:30
created

ReturnRejected   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 31
rs 10
ccs 15
cts 15
cp 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getHttpMethod() 0 4 1
A exportContextData() 0 17 2
1
<?php
2
3
namespace GFG\DTOMarketplace\Context\Venture\PostPayment;
4
5
use GFG\DTOMarketplace\Context\Base;
6
7
class ReturnRejected extends Base
8
{
9
    /**
10
     * {@inheritdoc}
11
     */
12 1
    public function getHttpMethod()
13
    {
14 1
        return 'put';
15
    }
16
17
    /**
18
     * {@inheritdoc}
19
     */
20 1
    public function exportContextData()
21
    {
22 1
        $dataWrapper = $this->getDataWrapper();
23 1
        $items = [];
24 1
        foreach ($dataWrapper->getItemCollection() as $item) {
25 1
            $items[] = [
26 1
                'venture_order_item_id' => $item->getVentureOrderItemId(),
27 1
                'order_item_id'         => $item->getOrderItemId()
28 1
            ];
29 1
        }
30
31 1
        return $this->prepareExport([
32 1
            'venture_order_nr' => $dataWrapper->getVentureOrderNr(),
33 1
            'order_nr'         => $dataWrapper->getOrderNr(),
34
            'item_collection'  => $items
35 1
        ]);
36
    }
37
}
38