IdentityObject   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 31
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setPassword() 0 4 1
A getPassword() 0 4 1
A setUsername() 0 4 1
A getUsername() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace DoctrineModuleTest\Authentication\Adapter\TestAsset;
6
7
/**
8
 * Simple mock object for authentication adapter tests
9
 *
10
 * @link    http://www.doctrine-project.org/
11
 */
12
class IdentityObject
13
{
14
    /** @var string|null */
15
    protected $username;
16
17
    /** @var string|null */
18
    protected $password;
19
20
    /**
21
     * @param mixed $password
22
     */
23
    public function setPassword($password) : void
24
    {
25
        $this->password = (string) $password;
26
    }
27
28
    public function getPassword() : ?string
29
    {
30
        return $this->password;
31
    }
32
33
    public function setUsername(string $username) : void
34
    {
35
        $this->username = (string) $username;
36
    }
37
38
    public function getUsername() : ?string
39
    {
40
        return $this->username;
41
    }
42
}
43