Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | public function notify(): void |
||
36 | 24 | { |
|
37 | if (! $this instanceof SplSubject) { |
||
38 | 1 | throw new LogicException(sprintf('Object %s is not an instance of SplSubject', get_class($this))); |
|
39 | } |
||
40 | 23 | /** @phpstan-var ObserversSet $observers */ |
|
41 | 3 | $observers = $this->getObservers(); |
|
42 | /** @phpstan-var Observer $observer */ |
||
43 | foreach ($observers as $observer) { |
||
44 | $observer->update($this); |
||
45 | 24 | } |
|
53 |