LocaleMapper   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A map() 0 4 1
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