| Total Complexity | 5 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | final class ReacterableObserver |
||
| 19 | { |
||
| 20 | public function created( |
||
| 21 | ReacterableContract $reacterable |
||
| 22 | ): void { |
||
| 23 | if ($this->shouldRegisterAsReacterOnCreate($reacterable) |
||
| 24 | && $reacterable->isNotRegisteredAsLoveReacter()) { |
||
| 25 | $reacterable->registerAsLoveReacter(); |
||
| 26 | } |
||
| 27 | } |
||
| 28 | |||
| 29 | private function shouldRegisterAsReacterOnCreate( |
||
| 34 | } |
||
| 35 | } |
||
| 36 |