Total Complexity | 3 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
14 | class BigIntegerIdentityGenerator implements Generator |
||
15 | { |
||
16 | /** |
||
17 | * The name of the sequence to pass to lastInsertId(), if any. |
||
18 | * |
||
19 | * @var string |
||
20 | */ |
||
21 | private $sequenceName; |
||
22 | |||
23 | /** |
||
24 | * Constructor. |
||
25 | * |
||
26 | * @param string|null $sequenceName The name of the sequence to pass to lastInsertId() |
||
27 | * to obtain the last generated identifier within the current |
||
28 | * database session/connection, if any. |
||
29 | */ |
||
30 | 1 | public function __construct($sequenceName = null) |
|
33 | 1 | } |
|
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | 3 | public function generate(EntityManagerInterface $em, $entity) |
|
41 | } |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | 3 | public function isPostInsertGenerator() |
|
52 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: