| Total Complexity | 5 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class Credentials |
||
| 16 | { |
||
| 17 | protected $username; |
||
| 18 | protected $password; |
||
| 19 | |||
| 20 | 5 | public function __construct(string $username, string $password) |
|
| 21 | { |
||
| 22 | 5 | if ($username === '') { |
|
| 23 | 2 | throw new CredentialsException('username is required', 1536353801); |
|
| 24 | } |
||
| 25 | 3 | if ($password === '') { |
|
| 26 | 1 | throw new CredentialsException('password is required', 1536353831); |
|
| 27 | } |
||
| 28 | 2 | $this->username = $username; |
|
| 29 | 2 | $this->password = $password; |
|
| 30 | 2 | } |
|
| 31 | |||
| 32 | 1 | public function getUsername(): string |
|
| 35 | } |
||
| 36 | |||
| 37 | 1 | public function getPassword(): string |
|
| 40 | } |
||
| 41 | } |
||
| 42 |