FieldTranslation::getLocale()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Yproximite\Api\Model\Field;
5
6
use Yproximite\Api\Model\ModelInterface;
7
8
/**
9
 * Class FieldTranslation
10
 */
11
class FieldTranslation implements ModelInterface
12
{
13
    /**
14
     * @var string
15
     */
16
    private $locale;
17
18
    /**
19
     * @var string
20
     */
21
    private $value;
22
23
    /**
24
     * FieldTranslation constructor.
25
     *
26
     * @param array $data
27
     */
28
    public function __construct(array $data)
29
    {
30
        $this->locale = (string) $data['locale'];
31
        $this->value  = (string) $data['value'];
32
    }
33
34
    /**
35
     * @return string
36
     */
37
    public function getLocale(): string
38
    {
39
        return $this->locale;
40
    }
41
42
    /**
43
     * @return string
44
     */
45
    public function getValue(): string
46
    {
47
        return $this->value;
48
    }
49
}
50