FieldTranslation   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 39
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getLocale() 0 4 1
A getValue() 0 4 1
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