| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 2 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 22 | 17 | public function __construct($options = array()) |
|
| 23 | { |
||
| 24 | 17 | $this->logger = null; |
|
| 25 | 17 | if ($options instanceof Configuration) { |
|
| 26 | 2 | $this->configuration = $options; |
|
| 27 | |||
| 28 | 1 | return; |
|
| 29 | } |
||
| 30 | |||
| 31 | 17 | if (!is_array($options)) { |
|
| 32 | 16 | throw new \InvalidArgumentException('Invalid option type.'); |
|
| 33 | } |
||
| 34 | |||
| 35 | 16 | $this->configuration = new Configuration($options); |
|
| 36 | 16 | } |
|
| 37 | |||
| 65 |