| Conditions | 3 |
| Paths | 3 |
| Total Lines | 7 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function applyConfig(array $config) |
||
| 30 | { |
||
| 31 | foreach ($config as $name => $value) { |
||
| 32 | if (in_array($name, array_keys($defaultConfig))) { |
||
|
|
|||
| 33 | $this->config[$name] = $config[$name] ?? $this->defaultConfig[$name]; |
||
| 34 | } else { |
||
| 35 | throw new ConfigException(sprintf(__CLASS__.' : unknown config property %s', $name)); |
||
| 36 | } |
||
| 52 |