| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | 16 | public function __construct($value) |
|
| 16 | { |
||
| 17 | 16 | $validator = new Validator(array('allow' => Validator::ALLOW_DNS | Validator::ALLOW_LOCAL)); |
|
| 18 | |||
| 19 | 16 | if (false === $validator->isValid($value)) { |
|
| 20 | 1 | throw new InvalidNativeArgumentException($value, array('string (valid hostname)')); |
|
| 21 | } |
||
| 22 | |||
| 23 | 15 | $this->value = $value; |
|
| 24 | 15 | } |
|
| 25 | } |
||
| 26 |