| Conditions | 5 |
| Paths | 5 |
| Total Lines | 18 |
| Lines | 18 |
| Ratio | 100 % |
| Tests | 10 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | 5 | View Code Duplication | protected function validateConfig() |
| 22 | { |
||
| 23 | 5 | if (! isset($this->options['host'])) { |
|
| 24 | 1 | throw new UnexpectedValueException("Missing 'host' as option"); |
|
| 25 | } |
||
| 26 | |||
| 27 | 4 | if (! isset($this->options['port'])) { |
|
| 28 | 1 | throw new UnexpectedValueException("Missing 'port' as option"); |
|
| 29 | } |
||
| 30 | |||
| 31 | 3 | if (! isset($this->options['username'])) { |
|
| 32 | 1 | throw new UnexpectedValueException("Missing 'username' as option"); |
|
| 33 | } |
||
| 34 | |||
| 35 | 2 | if (! isset($this->options['password'])) { |
|
| 36 | 1 | throw new UnexpectedValueException("Missing 'password' as option"); |
|
| 37 | } |
||
| 38 | 1 | } |
|
| 39 | } |
||
| 40 |