LanguageEntity   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 37
ccs 0
cts 15
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A jsonSerialize() 0 6 1
A getCode() 0 4 1
A setCode() 0 6 1
1
<?php
2
3
namespace GeoBase\Countries\Language;
4
5
use JsonSerializable;
6
7
class LanguageEntity implements JsonSerializable
8
{
9
    /**
10
     * @var string
11
     */
12
    protected $code;
13
14
    /**
15
     * @return array
16
     */
17
    public function jsonSerialize()
18
    {
19
        return [
20
            'code' => $this->getCode(),
21
        ];
22
    }
23
24
    /**
25
     * @return string
26
     */
27
    public function getCode()
28
    {
29
        return $this->code;
30
    }
31
32
    /**
33
     * @param string $code
34
     *
35
     * @return $this
36
     */
37
    public function setCode($code)
38
    {
39
        $this->code = $code;
40
41
        return $this;
42
    }
43
}
44