| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3.0416 |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | 1 | public function addFeatures(iterable $features): void |
|
| 37 | { |
||
| 38 | 1 | foreach ($features as $name => $options) { |
|
| 39 | 1 | if (isset($this->features[$name])) { |
|
| 40 | throw new \InvalidArgumentException(sprintf('Feature with given name "%s" already exists', $name)); |
||
| 41 | } |
||
| 42 | |||
| 43 | 1 | $this->features[$name] = new Definition($name, $options['since'] ?? null, $options['until'] ?? null); |
|
| 44 | } |
||
| 45 | 1 | } |
|
| 46 | |||
| 71 |