Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2.0054 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
32 | 5 | public function __construct(UriInterface $host, array $config = []) |
|
33 | { |
||
34 | 5 | if ($host->getHost() === '') { |
|
35 | throw new \LogicException('Host can not be empty'); |
||
36 | } |
||
37 | |||
38 | 5 | $this->host = $host; |
|
39 | |||
40 | 5 | $resolver = new OptionsResolver(); |
|
41 | 5 | $this->configureOptions($resolver); |
|
42 | 5 | $options = $resolver->resolve($config); |
|
43 | |||
44 | 5 | $this->replace = $options['replace']; |
|
45 | 5 | } |
|
46 | |||
73 |