Completed
Push — master ( e7a951...39e8d7 )
by WEBEWEB
05:07
created

PasswordAuthentication::getPassword()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/**
4
 * This file is part of the core-library package.
5
 *
6
 * (c) 2018 NdC/WBW
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Library\Core\Net;
13
14
/**
15
 * Password authentication.
16
 *
17
 * @author webeweb <https://github.com/webeweb/>
18
 * @package WBW\Library\Core\Net
19
 */
20
class PasswordAuthentication {
21
22
    /**
23
     * Password.
24
     *
25
     * @var string
26
     */
27
    private $password;
28
29
    /**
30
     * Username.
31
     *
32
     * @var string
33
     */
34
    private $username;
35
36
    /**
37
     * Constructor.
38
     *
39
     * @param string $username The username.
40
     * @param string $password The password.
41
     */
42
    public function __construct($username, $password) {
43
        $this->password = $password;
44
        $this->username = $username;
45
    }
46
47
    /**
48
     * Get the password.
49
     *
50
     * @return string Returns the password.
51
     */
52
    public function getPassword() {
53
        return $this->password;
54
    }
55
56
    /**
57
     * Get the username.
58
     *
59
     * @return string Returns the username.
60
     */
61
    public function getUsername() {
62
        return $this->username;
63
    }
64
65
    /**
66
     * Set the password.
67
     *
68
     * @param string $password The password.
69
     * @return PasswordAuthentication Returns the password authentication.
70
     */
71
    public function setPassword($password) {
72
        $this->password = $password;
73
        return $this;
74
    }
75
76
    /**
77
     * Set the username.
78
     *
79
     * @param string $username The username.
80
     * @return PasswordAuthentication Returns the password authentication.
81
     */
82
    public function setUsername($username) {
83
        $this->username = $username;
84
        return $this;
85
    }
86
87
}
88