| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 28 | protected function checkAndSetUpdated(LifecycleEventArgs $args): void |
|
| 25 | { |
||
| 26 | 28 | $entity = $args->getEntity(); |
|
| 27 | |||
| 28 | 28 | if (is_a($entity, UpdatedEntityInterface::class)) { |
|
| 29 | /** @var UpdatedEntityInterface $updatedEntity */ |
||
| 30 | 28 | $updatedEntity = $entity; |
|
| 31 | 28 | $updatedEntity->setUpdated(new DateTime()); |
|
| 32 | } |
||
| 33 | 28 | } |
|
| 34 | } |
||
| 35 |