Country::setName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace PhpAbac\Example;
4
5
class Country
6
{
7
    /** @var string **/
8
    protected $name;
9
    /** @var string **/
10
    protected $code;
11
    
12
    /**
13
     * @param string $name
14
     * @return \PhpAbac\Example\Country
15
     */
16 6
    public function setName($name)
17
    {
18 6
        $this->name = $name;
19
        
20 6
        return $this;
21
    }
22
    
23
    /**
24
     * @return string
25
     */
26
    public function getName()
27
    {
28
        return $this->name;
29
    }
30
    
31
    /**
32
     * @param string $code
33
     * @return \PhpAbac\Example\Country
34
     */
35 6
    public function setCode($code)
36
    {
37 6
        $this->code = $code;
38
        
39 6
        return $this;
40
    }
41
    
42
    /**
43
     * @return string
44
     */
45 3
    public function getCode()
46
    {
47 3
        return $this->code;
48
    }
49
}
50