LocaleMapper::map()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
/**
4
 * Copyright © 2016-present Spryker Systems GmbH. All rights reserved.
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\AkeneoPimMiddlewareConnector\Business\Mapper;
9
10
class LocaleMapper implements LocaleMapperInterface
11
{
12
    /**
13
     * @var string
14
     */
15
    protected const KEY_COLUMN_LOCALE_NAME = 'spy_locale.locale_name';
16
17
    /**
18
     * @var string
19
     */
20
    protected const KEY_COLUMN_LOCALE_ID = 'spy_locale.id_locale';
21
22
    /**
23
     * @param array $payload
24
     *
25
     * @return array
26
     */
27
    public function map(array $payload): array
28
    {
29
        return [
30
            $payload[static::KEY_COLUMN_LOCALE_NAME] => $payload[static::KEY_COLUMN_LOCALE_ID],
31
        ];
32
    }
33
}
34