SelectCallback   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getUniqueIdentifier() 0 3 1
1
<?php
2
3
/**
4
 * TechDivision\Import\Customer\Callbacks\SelectCallback
5
 *
6
 * PHP version 7
7
 *
8
 * @author    Tim Wagner <[email protected]>
9
 * @copyright 2021 TechDivision GmbH <[email protected]>
10
 * @license   https://opensource.org/licenses/MIT
11
 * @link      https://github.com/techdivision/import-customer
12
 * @link      http://www.techdivision.com
13
 */
14
15
namespace TechDivision\Import\Customer\Callbacks;
16
17
use TechDivision\Import\Customer\Utils\ColumnKeys;
18
use TechDivision\Import\Callbacks\AbstractSelectCallback;
19
20
/**
21
 * A callback implementation that converts the passed select value.
22
 *
23
 * @author    Tim Wagner <[email protected]>
24
 * @copyright 2021 TechDivision GmbH <[email protected]>
25
 * @license   https://opensource.org/licenses/MIT
26
 * @link      https://github.com/techdivision/import-customer
27
 * @link      http://www.techdivision.com
28
 */
29
class SelectCallback extends AbstractSelectCallback
30
{
31
32
    /**
33
     * Return's the customer email as unique identifier of the actual row.
34
     *
35
     * @return mixed The row's unique identifier
36
     */
37
    protected function getUniqueIdentifier()
38
    {
39
        return $this->getValue(ColumnKeys::EMAIL).'-'.$this->getValue(ColumnKeys::WEBSITE);
40
    }
41
}
42