| Conditions | 3 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function postPersist(LifecycleEventArgs $event): void |
||
| 21 | { |
||
| 22 | if ( |
||
| 23 | !$event->getObject() instanceof Comment |
||
| 24 | || $event->getObject()->getBody() !== self::COMMENT_BODY |
||
| 25 | ) { |
||
| 26 | return; |
||
| 27 | } |
||
| 28 | |||
| 29 | $event->getObject()->setBody(self::NEW_COMMENT_BODY); |
||
| 30 | $event->getEntityManager()->flush(); |
||
| 31 | } |
||
| 33 |