Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3.4746 |
Changes | 2 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
17 | 16 | public function __construct($options = array()) |
|
18 | { |
||
19 | 16 | if ($options instanceof Configuration) { |
|
20 | $this->configuration = $options; |
||
21 | |||
22 | return; |
||
23 | } |
||
24 | |||
25 | 16 | if (!is_array($options)) { |
|
26 | throw new \InvalidArgumentException('Invalid option type.'); |
||
27 | } |
||
28 | |||
29 | 16 | $this->configuration = new Configuration($options); |
|
30 | 11 | } |
|
31 | |||
56 |