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