Create::getHttpMethod()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace GFG\DTOMarketplace\Context\Venture\Entity;
4
5
use GFG\DTOMarketplace\Context\Base;
6
7
class Create extends Base
8
{
9
    /**
10
     * {@inheritdoc}
11
     */
12 1
    public function getHttpMethod()
13
    {
14 1
        return 'post';
15
    }
16
17
    /**
18
     * {@inheritdoc}
19
     */
20 2
    public function exportContextData()
21
    {
22 2
        $dataWrapper = $this->getDataWrapper();
23
24 2
        return $this->prepareExport([
25 2
            'id_iris_venture'           => $dataWrapper->getIdIrisVenture(),
26 2
            'fk_catalog_supplier'       => $dataWrapper->getFkCatalogSupplier(),
27 2
            'venture_code'              => $dataWrapper->getVentureCode(),
28
            // extra fields after sellercenter (Venture === Seller)
29 2
            'id'                        => $dataWrapper->getId(),
30 2
            'email'                     => $dataWrapper->getEmail(),
31 2
            'name'                      => $dataWrapper->getName(),
32 2
            'company_name'              => $dataWrapper->getCompanyName(),
33 2
            'shop_name'                 => $dataWrapper->getShopName(),
34 2
            'phone'                     => $dataWrapper->getPhone(),
35 2
            'address1'                  => $dataWrapper->getAddress1(),
36 2
            'address2'                  => $dataWrapper->getAddress2(),
37 2
            'city'                      => $dataWrapper->getCity(),
38 2
            'postcode'                  => $dataWrapper->getPostcode(),
39 2
            'country'                   => $dataWrapper->getCountry(),
40 2
            'customercare_email'        => $dataWrapper->getCustomercareEmail(),
41 2
            'customercare_name'         => $dataWrapper->getCustomercareName(),
42 2
            'customercare_phone'        => $dataWrapper->getCustomercarePhone(),
43 2
            'customercare_address1'     => $dataWrapper->getCustomercareAddress1(),
44 2
            'customercare_address2'     => $dataWrapper->getCustomercareAddress2(),
45 2
            'customercare_city'         => $dataWrapper->getCustomercareCity(),
46 2
            'customercare_postcode'     => $dataWrapper->getCustomercarePostcode(),
47 2
            'customercare_country'      => $dataWrapper->getCustomercareCountry(),
48 2
            'status'                    => $dataWrapper->getStatus(),
49 2
            'seller_custom_information' => $dataWrapper->getSellerCustomInformation()
50 2
        ]);
51
    }
52
}
53