| Conditions | 7 |
| Paths | 6 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | public function __construct( $username, $password, $domain = null ) { |
||
| 41 | $domainIsStringOrNull = ( is_string( $domain ) || $domain === null ); |
||
| 42 | if ( !is_string( $username ) || !is_string( $password ) || !$domainIsStringOrNull ) { |
||
| 43 | throw new InvalidArgumentException( 'Username, Password and Domain must all be strings' ); |
||
| 44 | } |
||
| 45 | if ( empty( $username ) || empty( $password ) ) { |
||
| 46 | throw new InvalidArgumentException( 'Username and Password are not allowed to be empty' ); |
||
| 47 | } |
||
| 48 | $this->username = $username; |
||
| 49 | $this->password = $password; |
||
| 50 | $this->domain = $domain; |
||
| 51 | } |
||
| 52 | |||
| 91 |