| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | 17 | public function configure(array $config) |
|
| 47 | {
|
||
| 48 | 17 | $this->setName($config[0] ?? 'unknown'); |
|
| 49 | |||
| 50 | 17 | if (count($config) < 1) {
|
|
| 51 | 1 | throw new \InvalidArgumentException("Minimum format must be satisfied: ['{$this->getName()}']");
|
|
| 52 | } |
||
| 53 | |||
| 54 | 16 | $this->key = $config[1] ?? ''; |
|
| 55 | 16 | $this->default = $config['default'] ?? null; |
|
| 56 | 16 | } |
|
| 69 | } |