GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 7bf065...13ae28 )
by Axel
02:07
created

User   A

Complexity

Total Complexity 16

Size/Duplication

Total Lines 146
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 84.62%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 16
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 146
ccs 33
cts 39
cp 0.8462
rs 10

15 Methods

Rating   Name   Duplication   Size   Complexity  
A setId() 0 5 1
A getId() 0 3 1
A setName() 0 5 1
A getName() 0 3 1
A setAge() 0 5 1
A getAge() 0 3 1
A setParentNationality() 0 5 1
A getParentNationality() 0 3 1
A addVisa() 0 5 1
A getVisas() 0 3 1
A setHasDoneJapd() 0 5 1
A getHasDoneJapd() 0 3 1
A setHasDrivingLicense() 0 5 1
A getHasDrivingLicense() 0 3 1
A removeVisa() 0 6 2
1
<?php
2
3
namespace PhpAbac\Example;
4
5
class User {
6
    /** @var int **/
7
    private $id;
8
    /** @var string **/
9
    private $name;
10
    /** @var int **/
11
    private $age;
12
    /** @var string **/
13
    private $parentNationality;
14
    /** @var array **/
15
    private $visas;
16
    /** @var bool **/
17
    private $hasDoneJapd;
18
    /** @var bool **/
19
    private $hasDrivingLicense;
20
21
    /**
22
     * @param int $id
23
     * @return \PhpAbac\Example\User
24
     */
25 5
    public function setId($id) {
26 5
        $this->id = $id;
27
        
28 5
        return $this;
29
    }
30
    
31
    /**
32
     * @return int
33
     */
34 2
    public function getId() {
35 2
        return $this->id;
36
    }
37
    
38
    /**
39
     * @param string $name
40
     * @return \PhpAbac\Example\User
41
     */
42 3
    public function setName($name) {
43 3
        $this->name = $name;
44
        
45 3
        return $this;
46
    }
47
    
48
    /**
49
     * @return string
50
     */
51
    public function getName() {
52
        return $this->name;
53
    }
54
    
55
    /**
56
     * @param int $age
57
     * @return \PhpAbac\Example\User
58
     */
59 5
    public function setAge($age) {
60 5
        $this->age = $age;
61
        
62 5
        return $this;
63
    }
64
    
65
    /**
66
     * @return int
67
     */
68 2
    public function getAge() {
69 2
        return $this->age;
70
    }
71
    
72
    /**
73
     * @param string $parentNationality
74
     * @return \PhpAbac\Example\User
75
     */
76 4
    public function setParentNationality($parentNationality) {
77 4
        $this->parentNationality = $parentNationality;
78
        
79 4
        return $this;
80
    }
81
    
82
    /**
83
     * @return bool
84
     */
85 2
    public function getParentNationality() {
86 2
        return $this->parentNationality;
87
    }
88
    
89
    /**
90
     * @param \PhpAbac\Example\Visa $visa
91
     * @return \PhpAbac\Example\User
92
     */
93 3
    public function addVisa(Visa $visa) {
94 3
        $this->visas[$visa->getId()] = $visa;
95
        
96 3
        return $this;
97
    }
98
    
99
    /**
100
     * @param \PhpAbac\Example\Visa $visa
101
     * @return \PhpAbac\Example\User
102
     */
103
    public function removeVisa(Visa $visa) {
104
        if(isset($this->visas[$visa->getId()])) {
0 ignored issues
show
Coding Style introduced by
Expected 1 space after IF keyword; 0 found
Loading history...
105
            unset($this->visas[$visa->getId()]);
106
        }
107
        return $this;
108
    }
109
    
110
    /**
111
     * @return array
112
     */
113 1
    public function getVisas() {
114 1
        return $this->visas;
115
    }
116
    
117
    /**
118
     * @param bool $hasDoneJapd
119
     * @return \PhpAbac\Example\User
120
     */
121 3
    public function setHasDoneJapd($hasDoneJapd) {
122 3
        $this->hasDoneJapd = $hasDoneJapd;
123
        
124 3
        return $this;
125
    }
126
    
127
    /**
128
     * @return bool
129
     */
130 1
    public function getHasDoneJapd() {
131 1
        return $this->hasDoneJapd;
132
    }
133
    
134
    /**
135
     * @param bool $hasDrivingLicense
136
     * @return \PhpAbac\Example\User
137
     */
138 3
    public function setHasDrivingLicense($hasDrivingLicense) {
139 3
        $this->hasDrivingLicense = $hasDrivingLicense;
140
        
141 3
        return $this;
142
    }
143
    
144
    /**
145
     * @return bool
146
     */
147 1
    public function getHasDrivingLicense() {
148 1
        return $this->hasDrivingLicense;
149
    }
150
}