Conditions | 3 |
Paths | 3 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | 24 | public function notify(): void |
|
35 | { |
||
36 | 24 | if (! $this instanceof SplSubject) { |
|
37 | /** @psalm-var object $this Psalm identify $this as empty-mixed */ |
||
38 | 1 | throw new LogicException(sprintf('Object %s is not an instance of SplSubject', get_class($this))); |
|
39 | } |
||
40 | 23 | foreach ($this->getObservers() as $observer) { |
|
41 | 3 | $observer->update($this); |
|
42 | } |
||
50 |