| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | 19 | public function set($key, ConfigItemInterface $item) |
|
| 29 | { |
||
| 30 | 19 | if(!$this->exists($key)) { |
|
| 31 | 19 | $this->config[$key] = $item; |
|
| 32 | 19 | } |
|
| 33 | |||
| 34 | // Get the existing item so we can set the new value on it |
||
| 35 | 19 | $existing = $this->config[$key]; |
|
| 36 | |||
| 37 | // Ensure that that tracking is correct for items belonging to this collection |
||
| 38 | 19 | $existing->trackMetadata($this->trackMetadata); |
|
| 39 | |||
| 40 | 19 | $existing->set($item->getValue(), $item->getMetadata()); |
|
| 41 | 19 | } |
|
| 42 | |||
| 73 |