Completed
Push — master ( 8a29f8...30084f )
by Márk
07:40
created

UserPasswordPair   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 2
c 2
b 0
f 1
lcom 0
cbo 0
dl 0
loc 32
ccs 4
cts 4
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getUsername() 0 4 1
A getPassword() 0 4 1
1
<?php
2
3
namespace Http\Message\Authentication;
4
5
/**
6
 * Trait implementing the common username-password pattern.
7
 *
8
 * @author Márk Sági-Kazár <[email protected]>
9
 */
10
trait UserPasswordPair
11
{
12
    /**
13
     * @var string
14
     */
15
    private $username;
16
17
    /**
18
     * @var string
19
     */
20
    private $password;
21
22
    /**
23
     * Returns the username.
24
     *
25
     * @return string
26
     */
27 2
    public function getUsername()
28
    {
29 2
        return $this->username;
30
    }
31
32
    /**
33
     * Returns the password.
34
     *
35
     * @return string
36
     */
37 2
    public function getPassword()
38
    {
39 2
        return $this->password;
40
    }
41
}
42