LanguageEntity::getCode()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
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