EiCredentials   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 11
c 2
b 0
f 0
dl 0
loc 51
ccs 0
cts 12
cp 0
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A withUsername() 0 6 1
A withPassword() 0 6 1
A getUsername() 0 3 1
A getPassword() 0 3 1
1
<?php
2
3
namespace Spinen\Ncentral\Type;
4
5
class EiCredentials
6
{
7
8
    /**
9
     * @var string
10
     */
11
    private $password;
12
13
    /**
14
     * @var string
15
     */
16
    private $username;
17
18
    /**
19
     * @return string
20
     */
21
    public function getPassword()
22
    {
23
        return $this->password;
24
    }
25
26
    /**
27
     * @param string $password
28
     * @return EiCredentials
29
     */
30
    public function withPassword($password)
31
    {
32
        $new = clone $this;
33
        $new->password = $password;
34
35
        return $new;
36
    }
37
38
    /**
39
     * @return string
40
     */
41
    public function getUsername()
42
    {
43
        return $this->username;
44
    }
45
46
    /**
47
     * @param string $username
48
     * @return EiCredentials
49
     */
50
    public function withUsername($username)
51
    {
52
        $new = clone $this;
53
        $new->username = $username;
54
55
        return $new;
56
    }
57
58
59
}
60
61