Total Complexity | 2 |
Total Lines | 16 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
14 | class IdentityGenerator implements Generator |
||
15 | { |
||
16 | /** |
||
17 | * {@inheritDoc} |
||
18 | */ |
||
19 | 912 | public function generate(EntityManagerInterface $em, ?object $entity) |
|
20 | { |
||
21 | 912 | return (int) $em->getConnection()->lastInsertId(); |
|
22 | } |
||
23 | |||
24 | /** |
||
25 | * {@inheritdoc} |
||
26 | */ |
||
27 | 930 | public function isPostInsertGenerator() : bool |
|
30 | } |
||
31 | } |
||
32 |