| Conditions | 2 |
| Paths | 2 |
| Total Lines | 7 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 36 | public function attachObserver(ObserverInterface $observer): void |
||
| 37 | { |
||
| 38 | if (array_key_exists($observer->getObserverName(), $this->observers)) { |
||
| 39 | throw new \InvalidArgumentException('Observer is already exist'); |
||
| 40 | } |
||
| 41 | |||
| 42 | $this->observers[$observer->getObserverName()] = $observer; |
||
| 43 | } |
||
| 80 |