| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 2.2559 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 39 | public function offsetUnset($index): void |
||
| 40 | { |
||
| 41 | try { |
||
| 42 | /** @var CharacterEffect $item */ |
||
| 43 | 1 | $item = Arrays::get($this->items, $index); |
|
| 44 | } catch (\Nette\InvalidArgumentException) { |
||
| 45 | throw new \OutOfRangeException("Offset invalid or out of range."); |
||
| 46 | } |
||
| 47 | 1 | parent::offsetUnset($index); |
|
| 48 | 1 | $item->onRemove($this->character, $item); |
|
| 49 | 1 | } |
|
| 51 |