| Conditions | 3 |
| Paths | 3 |
| Total Lines | 6 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | 1 | public function detach($notifier, $observer): void |
|
| 19 | { |
||
| 20 | 1 | if (array_key_exists($notifier, $this->observers)) { |
|
| 21 | 1 | if (($key = array_search($observer, $this->observers[$notifier])) !== false) { |
|
| 22 | 1 | unset($this->observers[$notifier][$key]); |
|
| 23 | 1 | $this->observers[$notifier] = array_values($this->observers[$notifier]); |
|
| 24 | } |
||
| 35 | } |