Country   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 80%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 45
ccs 8
cts 10
cp 0.8
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setName() 0 6 1
A getName() 0 4 1
A setCode() 0 6 1
A getCode() 0 4 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