| Conditions | 5 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 5 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | 4 | public function __construct($username, $password) |
|
| 32 | { |
||
| 33 | 4 | if (empty($username) || !is_string($username)) { |
|
| 34 | 1 | throw new InvalidArgumentException( |
|
| 35 | 1 | sprintf('Please provide username in %s', get_class($this)) |
|
| 36 | ); |
||
| 37 | } |
||
| 38 | 4 | $this->username = $username; |
|
| 39 | |||
| 40 | 4 | if (empty($password) || !is_string($password)) { |
|
| 41 | 1 | throw new InvalidArgumentException( |
|
| 42 | 1 | sprintf('Please provide password in %s', get_class($this)) |
|
| 43 | ); |
||
| 44 | } |
||
| 45 | 4 | $this->password = $password; |
|
| 46 | 4 | } |
|
| 47 | |||
| 56 |