SelectCallback::getUniqueIdentifier()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
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