DefaultBillingAddressImportObserver::process()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
/**
4
 * TechDivision\Import\Customer\Address\Observers\DefaultBillingAddressImportObserver
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 billing 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 DefaultBillingAddressImportObserver 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_BILLING, 'customer_entity_default_billingaddress');
43
    }
44
}
45