Visa   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 87
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 90%

Importance

Changes 0
Metric Value
wmc 8
lcom 0
cbo 0
dl 0
loc 87
ccs 18
cts 20
cp 0.9
rs 10
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A setId() 0 6 1
A getId() 0 4 1
A setCountry() 0 6 1
A getCountry() 0 4 1
A setCreatedAt() 0 6 1
A getCreatedAt() 0 4 1
A setLastRenewal() 0 6 1
A getLastRenewal() 0 4 1
1
<?php
2
3
namespace PhpAbac\Example;
4
5
class Visa
6
{
7
    /** @var int **/
8
    protected $id;
9
    /** @var Country **/
10
    protected $country;
11
    /** @var \DateTime **/
12
    protected $createdAt;
13
    /** @var \DateTime **/
14
    protected $lastRenewal;
15
    
16
    /**
17
     * @param int $id
18
     * @return \PhpAbac\Example\Visa
19
     */
20 6
    public function setId($id)
21
    {
22 6
        $this->id = $id;
23
        
24 6
        return $this;
25
    }
26
    
27
    /**
28
     * @return int
29
     */
30 6
    public function getId()
31
    {
32 6
        return $this->id;
33
    }
34
    
35
    /**
36
     * @param Country $country
37
     * @return \PhpAbac\Example\Visa
38
     */
39 6
    public function setCountry(Country $country)
40
    {
41 6
        $this->country = $country;
42
        
43 6
        return $this;
44
    }
45
    
46
    /**
47
     * @return Country
48
     */
49 3
    public function getCountry()
50
    {
51 3
        return $this->country;
52
    }
53
    
54
    /**
55
     * @param \DateTime $createdAt
56
     * @return \PhpAbac\Example\Visa
57
     */
58 6
    public function setCreatedAt(\DateTime $createdAt)
59
    {
60 6
        $this->createdAt = $createdAt;
61
        
62 6
        return $this;
63
    }
64
    
65
    /**
66
     * @return \DateTime
67
     */
68
    public function getCreatedAt()
69
    {
70
        return $this->createdAt;
71
    }
72
    
73
    /**
74
     * @param \DateTime $lastRenewal
75
     * @return \PhpAbac\Example\Visa
76
     */
77 6
    public function setLastRenewal(\DateTime $lastRenewal)
78
    {
79 6
        $this->lastRenewal = $lastRenewal;
80
        
81 6
        return $this;
82
    }
83
    
84
    /**
85
     * @return \DateTime
86
     */
87 3
    public function getLastRenewal()
88
    {
89 3
        return $this->lastRenewal;
90
    }
91
}
92