DefaultShippingAddressImportObserver   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
c 1
b 0
f 0
dl 0
loc 11
ccs 0
cts 2
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 3 1
1
<?php
2
3
/**
4
 * TechDivision\Import\Customer\Address\Observers\DefaultShippingAddressImportObserver
5
 *
6
 * PHP version 7
7
 *
8
 * @author    Vadim Justus <[email protected]>
9
 * @author    Harald Deiser <[email protected]>
10
 * @author    Tim Wagner <[email protected]>
11
 * @copyright 2019 TechDivision GmbH <[email protected]>
12
 * @license   https://opensource.org/licenses/MIT
13
 * @link      https://github.com/techdivision/import-customer-address
14
 * @link      http://www.techdivision.com
15
 */
16
17
namespace TechDivision\Import\Customer\Address\Observers;
18
19
use TechDivision\Import\Customer\Address\Utils\ColumnKeys;
20
21
/**
22
 * Updates the default shipping address in the customer entity AFTER the address has been imported.
23
 *
24
 * @author    Vadim Justus <[email protected]>
25
 * @author    Harald Deiser <[email protected]>
26
 * @author    Tim Wagner <[email protected]>
27
 * @copyright 2019 TechDivision GmbH <[email protected]>
28
 * @license   https://opensource.org/licenses/MIT
29
 * @link      https://github.com/techdivision/import-customer-address
30
 * @link      http://www.techdivision.com
31
 */
32
class DefaultShippingAddressImportObserver extends AbstractDefaultAddressImportObserver
33
{
34
35
    /**
36
     * Process the observer's business logic.
37
     *
38
     * @return void
39
     */
40
    protected function process()
41
    {
42
        $this->saveDefaultAddressByType(ColumnKeys::ADDRESS_DEFAULT_SHIPPING, 'customer_entity_default_shippingaddress');
43
    }
44
}
45