Completed
Pull Request — master (#2)
by Michał
01:58
created

Credentials::getPassword()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace Barenote\Domain;
3
4
/**
5
 * Class Credentials
6
 * @package BareNote\Barenote\Domain
7
 */
8
class Credentials implements \JsonSerializable
9
{
10
    /**
11
     * @var string
12
     */
13
    private $username;
14
    /**
15
     * @var string
16
     */
17
    private $password;
18
19
    /**
20
     * Credentials constructor.
21
     * @param string $username
22
     * @param string $password
23
     */
24
    public function __construct(string $username, string $password)
25
    {
26
        $this->username = $username;
27
        $this->password = $password;
28
    }
29
30
    /**
31
     * @return string
32
     */
33
    public function getUsername(): string
34
    {
35
        return $this->username;
36
    }
37
38
    /**
39
     * @return string
40
     */
41
    public function getPassword(): string
42
    {
43
        return $this->password;
44
    }
45
46
    public function jsonSerialize()
47
    {
48
        return ['username' => $this->username, 'password' => $this->password];
49
    }
50
}